1 / 63

Lecture 4 Geodatabases

Lecture 4 Geodatabases. Geodatabases Outline. Data types Geodatabases Data table joins Spatial joins Field calculator Calculate geometry ArcCatalog functions. Lecture 4. Data types . Directly loadable data types. dBase (.dbf) Text with comma (.csv) or tab-separated values (.txt)

aliya
Download Presentation

Lecture 4 Geodatabases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 4Geodatabases

  2. Geodatabases Outline INF385T(28437) – Spring 2013 – Lecture 4 Data types Geodatabases Data table joins Spatial joins Field calculator Calculate geometry ArcCatalog functions

  3. Lecture 4 Data types INF385T(28437) – Spring 2013 – Lecture 4

  4. Directly loadable data types INF385T(28437) – Spring 2013 – Lecture 4 • dBase (.dbf) • Text with comma (.csv) or tab-separated values (.txt) • Microsoft Access (.mdb) • Microsoft Excel (.xls)

  5. Data table formats INF385T(28437) – Spring 2013 – Lecture 4 • 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

  6. Lecture 4 geodatabases INF385T(28437) – Spring 2013 – Lecture 4

  7. Geodatabase types INF385T(28437) – Spring 2013 – Lecture 4 Manages 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

  8. Geodatabase types INF385T(28437) – Spring 2013 – Lecture 4 • 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 users

  9. New file geodatabase INF385T(28437) – Spring 2013 – Lecture 4 ArcCatalog

  10. Import into geodatabase • Shapefile features INF385T(28437) – Spring 2013 – Lecture 4

  11. Import into geodatabase INF385T(28437) – Spring 2013 – Lecture 4 Tables

  12. Export from geodatabase INF385T(28437) – Spring 2013 – Lecture 4

  13. View geodatabases INF385T(28437) – Spring 2013 – Lecture 4 Cannot identify names in Windows Explorer Must use ArcCatalog

  14. Compact geodatabases INF385T(28437) – Spring 2013 – Lecture 4 • 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

  15. Compress geodatabases INF385T(28437) – Spring 2013 – Lecture 4 • 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

  16. Lecture 4 Data table joins INF385T(28437) – Spring 2013 – Lecture 4

  17. Data table joins INF385T(28437) – Spring 2013 – Lecture 4 Putting two tables together to make one table Join two tables one-to-one by row Must have the same values and data types

  18. Join example INF385T(28437) – Spring 2013 – Lecture 4 • 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

  19. Data table INF385T(28437) – Spring 2013 – Lecture 4 • Heating fuel table (Excel spreadsheet)

  20. Data table INF385T(28437) – Spring 2013 – Lecture 4 • 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

  21. Feature class INF385T(28437) – Spring 2013 – Lecture 4 County polygons

  22. Add data and features to map INF385T(28437) – Spring 2013 – Lecture 4

  23. Open attribute tables INF385T(28437) – Spring 2013 – Lecture 4 Find common attribute to join

  24. Data problem INF385T(28437) – Spring 2013 – Lecture 4 FIPS has leading zero and is a TEXT field. GEO_ID2 is a NUMBER fieldwith no leading zeros.

  25. Data solution INF385T(28437) – Spring 2013 – Lecture 4 Make a new NUMBER field in Counties attribute table and use field calculator to populate new field from old

  26. Data solution INF385T(28437) – Spring 2013 – Lecture 4 New FIPS_NUM is same as GEO_ID2 and ready to join

  27. Join tables INF385T(28437) – Spring 2013 – Lecture 4

  28. Join result INF385T(28437) – Spring 2013 – Lecture 4 Heating fuel data is now listed for every county in the USCounties feature attribute table

  29. Permanent joins INF385T(28437) – Spring 2013 – Lecture 4 Joins are temporary and can be removed Export data to make joins permanent

  30. Choropleth map result INF385T(28437) – Spring 2013 – Lecture 4

  31. Lecture 4 Spatial joins INF385T(28437) – Spring 2013 – Lecture 4

  32. Spatial join example INF385T(28437) – Spring 2013 – Lecture 4 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

  33. Spatial joins INF385T(28437) – Spring 2013 – Lecture 4 • Points to polygons • Spatially joins points (block centroids) within polygons (neighborhoods) • Joins using “shape” (not attribute field)

  34. Spatial joins INF385T(28437) – Spring 2013 – Lecture 4 Right click polygon layer (neighborhoods)

  35. Join result INF385T(28437) – Spring 2013 – Lecture 4 New polygon feature

  36. Join result INF385T(28437) – Spring 2013 – Lecture 4 Counts and sums

  37. Count result INF385T(28437) – Spring 2013 – Lecture 4 Number of points in each polygon

  38. Sum result INF385T(28437) – Spring 2013 – Lecture 4 • Every block group centroid has associated data • (e.g. H040004, heating electricity shown in labels)

  39. 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

  40. Choropleth map result (sum) INF385T(28437) – Spring 2013 – Lecture 4

  41. Choropleth map result (sum) INF385T(28437) – Spring 2013 – Lecture 4

  42. Other spatial joins INF385T(28437) – Spring 2013 – Lecture 4 • Polygons to points • Example: ATM robberies (points) need neighborhood name

  43. Polygon to point join result INF385T(28437) – Spring 2013 – Lecture 4 Neighborhood name shows on each point

  44. Other spatial joins INF385T(28437) – Spring 2013 – Lecture 4 • Points to points • Example: What is the distance of a burglary to the nearest commercial property?

  45. Point to point join result INF385T(28437) – Spring 2013 – Lecture 4 Distance to nearest commercial property shows on each burglary point

  46. Lecture 4 Field calculator (as in “Feature-Attribute” Calculator) INF385T(28437) – Spring 2013 – Lecture 4

  47. Sample functions INF385T(28437) – Spring 2013 – Lecture 4 Performs numeric calculations Populates field Concatenates textdata

  48. Field calculator functions INF385T(28437) – Spring 2013 – Lecture 4 Calculate acres to square miles

  49. Field calculator functions INF385T(28437) – Spring 2013 – Lecture 4 Populate field with county name

  50. Field calculator functions INF385T(28437) – Spring 2013 – Lecture 4 Concatenate house number and street fields

More Related