Lesson 0.4Lesson 0.4 · Ground Rules — Thinking Spatially
Spatial Data Formats
The containers your data lives in
You email a colleague “the shapefile.” They open it. Everything is in the wrong place.
You sent one file — plots.shp. What you should have sent was at least four: the .shp, its .shx, its .dbf, and the all-important .prj. Without the .prj, your colleague's GIS has no idea which coordinate system the shapes are in, and your carefully-placed plots land in the sea. The format your data lives in is not a boring technicality — it silently decides what the data can carry and whether anyone else can use it. Here is the field guide.
The format is the promise your data makes to the next person who opens it.
The Shapefile: everywhere, ancient, and a bundle of files
The Shapefile (Esri, early 1990s) is the most common vector format on Earth and the one you will be handed most often — despite showing its age. Its defining quirk: a “shapefile” is not one file but a set that must travel together. The mandatory three are .shp (the geometry), .shx (a geometry index) and .dbf (the attribute table); the near-essential .prj stores the coordinate system. Miss the .prj and the CRS is lost (see the previous lesson for how much pain that causes).
Its limits bite in practice: attribute column names are capped at 10 characters (so population_2011 becomes popula_201), it stores only one geometry type per file, struggles with non-Latin text encodings, and each file is limited to 2 GB. It survives because everything reads it — not because it is good.
A shapefile is a boy band — it only works when all the members show up. Never lose the .prj.
GeoJSON: the format of the web
GeoJSON stores vector features as plain, human-readable text in JSON. One file, no sidecars, opens in any text editor. It is the lingua franca of web maps (Leaflet, Mapbox, MapLibre all speak it natively) and of data exchange between programs.
Two things to know. First, the GeoJSON specification says coordinates should be in WGS 84 longitude-latitude (EPSG:4326) — so it is a storage/exchange format, not an analysis format. Second, because it is verbose text, large GeoJSON files get heavy fast; a city's worth of buildings is far leaner as a GeoPackage. Use GeoJSON to move modest vector data around, especially to and from the web.
GeoPackage: the modern default you should prefer
The GeoPackage (.gpkg) is an open OGC standard — a single SQLite database file that can hold many layers at once, vector and raster, with full-length column names, proper text encoding, spatial indexes and stored styles. One tidy file instead of a scattering of sidecars.
For almost all desktop work, GeoPackage is now the sensible default: it fixes every shapefile annoyance, it is a genuine open standard (OGC GeoPackage 1.4), and QGIS treats it as a first-class citizen. The professional habit is simple — accept shapefiles, but save your own work as GeoPackage. You will thank yourself when one file, not twelve, needs emailing.
Rule of thumb: receive .shp, work and deliver .gpkg.
Raster & exchange formats: GeoTIFF, COG, and KML
For raster, the workhorse is the GeoTIFF — a TIFF image carrying its georeferencing (position, resolution, CRS) inside. Satellite imagery, DEMs and analysis outputs are almost always GeoTIFFs. Its modern sibling, the Cloud-Optimized GeoTIFF (COG), is internally arranged so a browser can stream just the piece it needs from cloud storage — increasingly the way big imagery is served.
KML/KMZ (the Google Earth format) is the one you will use to communicate, not analyse: it is superb for handing a client an interactive fly-through, but it is WGS 84 only and not built for heavy GIS work. And a family you will meet in Module 11 — PostGIS — is not a file at all but a spatial database, the right home once data outgrows single files.
OGC GeoPackage 1.4
Open single-file container (vector + raster, many layers)
The recommended modern default; a true open OGC standard (SQLite-based).
GeoJSON (RFC 7946)
Text vector format for the web / exchange
Coordinates in WGS 84 (EPSG:4326); great for exchange, heavy at scale.
GeoTIFF / COG
Georeferenced raster (imagery, DEMs)
The raster workhorse; COG streams efficiently from the cloud.
Esri Shapefile
Legacy multi-file vector format
Universal but limited: 10-char fields, needs .shp/.shx/.dbf/.prj together, 2 GB cap.
Workshop — convert a messy shapefile into a clean GeoPackage
You will take a real (imperfect) shapefile, inspect its sidecars and truncated fields, and convert it to a single well-formed GeoPackage — the everyday hygiene move of a professional.
QGIS 3.44 or ArcGIS Pro; any shapefile (Datameet or OSM export).
Goal: one .gpkg containing a cleaned layer converted from a shapefile Data: any shapefile (e.g. a Datameet district boundary, or an OSM export) Time: ~30 minutes
- 1Download a shapefile (e.g. an Indian district boundary from Datameet, CC BY 2.5 India) and look at the folder: note the
.shp,.shx,.dbfand.prjtravelling together. Delete the.prjtemporarily and re-open to see the CRS go missing (then restore it). - 2Open the attribute table and spot any 10-character-truncated field names — evidence of the shapefile limit.
- 3Convert to GeoPackage. In QGIS: right-click the layer → Export → Save Features As → format GeoPackage, set the correct CRS. In ArcGIS Pro: use the Feature Class To Feature Class / Export Features tool into a
.gpkgor file geodatabase. - 4Rename a truncated field to its full name in the GeoPackage (now that the 10-char limit is gone) and confirm it sticks.
- 5Add a second layer into the same
.gpkgto prove a GeoPackage holds many layers in one file — the whole point.
You’ll walk away with
A single, correctly-projected GeoPackage with full-length field names holding multiple layers — and a working habit: receive shapefiles, deliver GeoPackages.
Three altitudes on the same idea
Read the band that fits you — or all three.
Save your site data as GeoPackage; export KML for the client walk-through. When a consultant sends a shapefile, check the .prj is present before you trust the position. When you hand geometry to CAD/BIM, remember formats change again (DWG, IFC) — Module 1 covers that bridge.
Statutory data exchange lives and dies by formats and CRS. Government layers often arrive as shapefiles (with the 10-character column limit mangling field names) or as data.gov.in tables under GODL-India. Standardise your working store on GeoPackage, keep a data dictionary for truncated field names, and always record the CRS.
GeoJSON is your bridge to the web map. When you want an interactive street or catchment map on a project site, GeoJSON is what Leaflet/Mapbox consume. Keep files small (simplify geometry), keep them in EPSG:4326 for the web, and keep a metre-based GeoPackage copy for the analysis behind them.
“A file format is just a technical detail — any GIS opens anything.”
.prj goes missing; GeoJSON quietly assumes WGS 84; KML cannot hold your analysis. Choosing the format is choosing what survives the trip. It is one of the most consequential 'small' decisions in a project.Do it yourself
Match the container to the job.
- 1You must email one vector dataset with 15-character field names intact. Which format?
- 2List the four files that must travel with a
.shp, and say which one holds the CRS. - 3You want to give a client an interactive fly-through in Google Earth. Which format?
- 4Why is a 30 MB GeoJSON of a whole city's buildings a bad idea, and what would you use instead?
The format habit, in one line
Peer-reviewed journals & authoritative standards
- 01de Smith, M.J., Goodchild, M.F. & Longley, P.A. — Geospatial Analysis: A Comprehensive Guide, 7th ed. — Winchelsea Press, 2025.
- 02Bolstad, P. & Manson, S. — GIS Fundamentals: A First Text on Geographic Information Systems, 7th ed. — Eider Press, 2022.
- 03OpenStreetMap — OpenStreetMap Foundation, ongoing.
You now have the whole grammar of GIS — what it is, the two data models, coordinate systems and the formats that carry them. Module 1 turns grammar into fluency: the software you will actually use, starting with QGIS, your free professional GIS.
The author
Amogh N P
Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.
More about Amogh →