Files, Conversion, and Spatial Databases

Remark

These lecture notes are in early access and will continue to evolve based on classroom experience and feedback.

3. Files, Conversion, and Spatial Databases#

Chapters 1 and 2 established the question, data model, and CRS. This chapter asks how to keep those decisions intact when data moves between systems and tools. Sections 1-5 tour the file formats you will meet most often — GeoJSON, the ESRI Shapefile, GeoPackage, the Esri File Geodatabase, KML, GML, and OpenStreetMap — and Section 6 turns that tour into a decision framework and a safe conversion workflow. Section 7 introduces spatial SQL, PostGIS, and SpatiaLite. Sections 8 and 9 extend the workflow to repeatable ETL, APIs, open data, and licensing.

The progression is deliberate:

  1. geospatial file formats and GeoJSON.

  2. the ESRI Shapefile.

  3. GeoPackage and File Geodatabases.

  4. KML and GML.

  5. OpenStreetMap data.

  6. choosing and converting between formats.

  7. spatial database systems: PostGIS and SpatiaLite.

  8. geospatial ETL and data carpentry.

  9. open data, APIs, and licensing.

A reusable storage decision

  1. Audience: web map, desktop GIS, notebook, or service?

  2. Scale: how much data must each query read?

  3. Schema: multiple layers, long names, nulls, dates, or metadata?

  4. Concurrency: one analyst or many writers/readers?

  5. Reproducibility: can source, version, CRS, and transformations be recovered?

Keep an immutable source and document every conversion. Later analytical work assumes inputs have already passed this check.