Download - Lecture 4 Geodatabases
![Page 1: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/1.jpg)
Lecture 4Geodatabases
![Page 2: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/2.jpg)
Geodatabases Outline Data types Geodatabases Data table joins Spatial joins Field calculator Calculate geometry ArcCatalog functions
2INF385T(28437) – Spring 2013 – Lecture 4
![Page 3: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/3.jpg)
DATA TYPES Lecture 4
3INF385T(28437) – Spring 2013 – Lecture 4
![Page 4: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/4.jpg)
Directly loadable data types
dBase (.dbf) Text with comma (.csv) or tab-
separated values (.txt) Microsoft Access (.mdb) Microsoft Excel (.xls)
4INF385T(28437) – Spring 2013 – Lecture 4
![Page 5: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/5.jpg)
5
Data table formats First row must have attribute names
with self-documenting labels (e.g. Pop5To17, Area)
Usual naming convention first character is a letter remaining characters be any letters, digits,
or the underscore character All additional rows of a data table
contain attribute values None of the rows can be sums,
averages, or other statistics of raw data rows
INF385T(28437) – Spring 2013 – Lecture 4
![Page 6: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/6.jpg)
GEODATABASESLecture 4
7INF385T(28437) – Spring 2013 – Lecture 4
![Page 7: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/7.jpg)
8
Geodatabase typesManages features and tables inside a database management system File geodatabase
stores datasets in a folder of files each dataset file up to 1 TB in size can be used across platforms can be compressed and encrypted for
read-only, secure use
INF385T(28437) – Spring 2013 – Lecture 4
![Page 8: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/8.jpg)
9
Geodatabase types Personal geodatabase
stores datasets in a Microsoft Access .mdb file
storage sizes between 250 and 500 MB limited to 2GB only supported on Windows
ArcSDE geodatabase stores datasets in a number of optional
DBMSs: IBM DB2, IBM Informix , Microsoft SQL
Server , Oracle, or PostgreSQL unlimited size and usersINF385T(28437) – Spring 2013 – Lecture 4
![Page 9: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/9.jpg)
10
New file geodatabase
ArcCatalog
INF385T(28437) – Spring 2013 – Lecture 4
![Page 10: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/10.jpg)
11
Import into geodatabase
INF385T(28437) – Spring 2013 – Lecture 4
Shapefile features
![Page 11: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/11.jpg)
12
Import into geodatabase Tables
INF385T(28437) – Spring 2013 – Lecture 4
![Page 12: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/12.jpg)
13
Export from geodatabase
INF385T(28437) – Spring 2013 – Lecture 4
![Page 13: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/13.jpg)
14
View geodatabases Cannot identify names in Windows
Explorer Must use ArcCatalog
INF385T(28437) – Spring 2013 – Lecture 4
![Page 14: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/14.jpg)
15
Compact geodatabases File and personal geodatabases
Reduces size and improves performance Compact personal geodatabases > 250
MB. Geodatabases with frequent data entry,
deletion, or general editing Open geodatabases in ArcMap cannot be
compacted remove any layers with a source table or
feature class in that database from the TOC
INF385T(28437) – Spring 2013 – Lecture 4
![Page 15: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/15.jpg)
16
Compress geodatabases File geodatabases
Once compressed, a feature class or table is read-only and cannot be edited
Compression is ideally suited to mature datasets that do not require further editing
Compressed dataset can be uncompressed to return it to its original, read-write format
INF385T(28437) – Spring 2013 – Lecture 4
![Page 16: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/16.jpg)
DATA TABLE JOINSLecture 4
17INF385T(28437) – Spring 2013 – Lecture 4
![Page 17: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/17.jpg)
18
Data table joins Putting two tables together to make
one table Join two tables one-to-one by row Must have the same values and data
types
INF385T(28437) – Spring 2013 – Lecture 4
![Page 18: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/18.jpg)
19
Join example Housing heating fuel study for U.S.
Counties Source: U.S. Census
Data table: Census SF3 table for heating fuel by county
Map Features: County polygons
INF385T(28437) – Spring 2013 – Lecture 4
![Page 19: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/19.jpg)
20
Data table Heating fuel table (Excel spreadsheet)
INF385T(28437) – Spring 2013 – Lecture 4
![Page 20: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/20.jpg)
21
Data table Heating fuel table data dictionary
H040001: Occupied housing units: House heating fuel; TOTAL Units H040002: Occupied housing units: House heating fuel; Utility gas H040003: Occupied housing units: House heating fuel; Bottled; tank;
or LP gas H040004: Occupied housing units: House heating fuel; Electricity
H040005: Occupied housing units: House heating fuel; Fuel oil; kerosene; etc.
H040006: Occupied housing units: House heating fuel; Coal or coke H040007: Occupied housing units: House heating fuel; Wood H040008: Occupied housing units: House heating fuel; Solar energy H040009: Occupied housing units: House heating fuel; Other fuel H040010: Occupied housing units: House heating fuel; No fuel used
INF385T(28437) – Spring 2013 – Lecture 4
![Page 21: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/21.jpg)
22
Feature class County polygons
INF385T(28437) – Spring 2013 – Lecture 4
![Page 22: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/22.jpg)
23
Add data and features to map
INF385T(28437) – Spring 2013 – Lecture 4
![Page 23: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/23.jpg)
24
Open attribute tables Find common attribute to join
INF385T(28437) – Spring 2013 – Lecture 4
![Page 24: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/24.jpg)
25
Data problem FIPS has leading zero
and is a TEXT field.
GEO_ID2 is a NUMBER fieldwith no leading zeros.
INF385T(28437) – Spring 2013 – Lecture 4
FIPS01001010030100501007
GEO_ID21001100310051007
![Page 25: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/25.jpg)
26
Data solution Make a new NUMBER field in Counties
attribute table and use field calculator to populate new field from old
INF385T(28437) – Spring 2013 – Lecture 4
![Page 26: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/26.jpg)
27
Data solution New FIPS_NUM is same as GEO_ID2 and
ready to join
INF385T(28437) – Spring 2013 – Lecture 4
![Page 27: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/27.jpg)
28
Join tables
INF385T(28437) – Spring 2013 – Lecture 4
![Page 28: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/28.jpg)
29
Join result Heating fuel data is now listed for
every county in the USCounties feature attribute table
INF385T(28437) – Spring 2013 – Lecture 4
![Page 29: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/29.jpg)
30
Permanent joins Joins are temporary and can be
removed Export data to make joins permanent
INF385T(28437) – Spring 2013 – Lecture 4
![Page 30: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/30.jpg)
31
Choropleth map result
INF385T(28437) – Spring 2013 – Lecture 4
![Page 31: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/31.jpg)
SPATIAL JOINSLecture 4
32INF385T(28437) – Spring 2013 – Lecture 4
![Page 32: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/32.jpg)
33
Spatial join example You have census block group centroids
with housing fuel data
You want to know housing fuel data by neighborhoods
No attributes in common Spatial join needed
INF385T(28437) – Spring 2013 – Lecture 4
![Page 33: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/33.jpg)
34
Spatial joins Points to polygons
Spatially joins points (block centroids) within polygons (neighborhoods)
Joins using “shape” (not attribute field)
INF385T(28437) – Spring 2013 – Lecture 4
![Page 34: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/34.jpg)
35
Spatial joins Right click polygon layer
(neighborhoods)
INF385T(28437) – Spring 2013 – Lecture 4
![Page 35: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/35.jpg)
36
Join result New polygon feature
INF385T(28437) – Spring 2013 – Lecture 4
![Page 36: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/36.jpg)
37
Join result Counts and sums
INF385T(28437) – Spring 2013 – Lecture 4
![Page 37: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/37.jpg)
38
Count result Number of points in each polygon
INF385T(28437) – Spring 2013 – Lecture 4
![Page 38: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/38.jpg)
39
Sum result Every block group centroid has associated
data (e.g. H040004, heating electricity shown in
labels)
INF385T(28437) – Spring 2013 – Lecture 4
![Page 39: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/39.jpg)
40
Sum result
INF385T(28437) – Spring 2013 – Lecture 4
One neighborhood example Central business district
4 block groups Housing units with electricity fuel (80 + 299 + 128
+ 292 ) Sum = 799
![Page 40: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/40.jpg)
41
Choropleth map result (sum)
INF385T(28437) – Spring 2013 – Lecture 4
![Page 41: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/41.jpg)
42
Choropleth map result (sum)
INF385T(28437) – Spring 2013 – Lecture 4
![Page 42: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/42.jpg)
43
Other spatial joins Polygons to points
Example: ATM robberies (points) need neighborhood name
INF385T(28437) – Spring 2013 – Lecture 4
![Page 43: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/43.jpg)
44
Polygon to point join result Neighborhood name shows on each
point
INF385T(28437) – Spring 2013 – Lecture 4
![Page 44: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/44.jpg)
45
Other spatial joins Points to points
Example: What is the distance of a burglary to the nearest commercial property?
INF385T(28437) – Spring 2013 – Lecture 4
![Page 45: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/45.jpg)
46
Point to point join result Distance to nearest commercial
property shows on each burglary point
INF385T(28437) – Spring 2013 – Lecture 4
![Page 46: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/46.jpg)
FIELD CALCULATORLecture 4
47INF385T(28437) – Spring 2013 – Lecture 4
(as in “Feature-Attribute” Calculator)
![Page 47: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/47.jpg)
Sample functions
Performs numeric calculations Populates field Concatenates text data
48INF385T(28437) – Spring 2013 – Lecture 4
![Page 48: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/48.jpg)
Field calculator functions Calculate acres to square miles
49INF385T(28437) – Spring 2013 – Lecture 4
![Page 49: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/49.jpg)
Field calculator functions Populate field with county name
INF385T(28437) – Spring 2013 – Lecture 4 50
![Page 50: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/50.jpg)
Field calculator functions Concatenate house number and street
fields
INF385T(28437) – Spring 2013 – Lecture 4 51
![Page 51: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/51.jpg)
CALCULATE GEOMETRYLecture 4
52INF385T(28437) – Spring 2013 – Lecture 4
![Page 52: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/52.jpg)
Polygon/point centroids Advanced calculations for finding a
polygon’s point centroid
53INF385T(28437) – Spring 2013 – Lecture 4
![Page 53: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/53.jpg)
Calculate XY fields Add new X and Y fields in the attribute
table
INF385T(28437) – Spring 2013 – Lecture 4 54
![Page 54: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/54.jpg)
Calculate XY fields Calculate geometry for X field, repeat
for Y
INF385T(28437) – Spring 2013 – Lecture 4 55
![Page 55: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/55.jpg)
56
XY field results Results are X and Y values based on
map properties (e.g. Long/Lat or XY feet)
INF385T(28437) – Spring 2013 – Lecture 4
![Page 56: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/56.jpg)
Export as shapefile XY events should be exported as
permanent shapefile or feature class
59INF385T(28437) – Spring 2013 – Lecture 4
![Page 57: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/57.jpg)
ARCCATALOG FUNCTIONSLecture 4
63INF385T(28437) – Spring 2013 – Lecture 4
![Page 58: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/58.jpg)
Basic functions Copy, paste, rename, etc.
64INF385T(28437) – Spring 2013 – Lecture 4
![Page 59: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/59.jpg)
View and edit properties Projections, fields, etc.
65INF385T(28437) – Spring 2013 – Lecture 4
![Page 60: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/60.jpg)
View metadata
66INF385T(28437) – Spring 2013 – Lecture 4
![Page 61: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/61.jpg)
Edit metadata
67INF385T(28437) – Spring 2013 – Lecture 4
![Page 62: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/62.jpg)
Create new files Geodatabases, tables, features,
etc.
68INF385T(28437) – Spring 2013 – Lecture 4
![Page 63: Lecture 4 Geodatabases](https://reader036.vdocuments.us/reader036/viewer/2022062302/56816386550346895dd470a6/html5/thumbnails/63.jpg)
Summary Data types Geodatabases Data table joins Spatial joins Field calculator Calculate geometry ArcCatalog functions
69INF385T(28437) – Spring 2013 – Lecture 4