How to read this table
Format choice is a function of who reads the file next. The columns below capture the constraints that actually matter when that handoff goes wrong: size ceilings, CRS handling, attribute fidelity, multi-layer capability, and what consumes the format natively.
The table
| Format | Max file size | CRS support | Multi-layer | Browser-native | Attribute types | Best for |
|---|---|---|---|---|---|---|
| GeoJSON | None (practical: ~1 GB) | WGS 84 only (RFC 7946) | No | Yes (every web library) | JSON: string, number, bool, null, array, object | Web maps, APIs, tooling interchange |
| Shapefile | 2 GB per file, 10-char field names | Per-file via .prj | No (one geometry type per bundle) | No | dBase: string, int, float, date (no time, no bool, no null) | Legacy GIS exchange, government delivery |
| GeoPackage | 140 TB (SQLite cap) | Per-layer, any EPSG | Yes (many layers per file) | No | SQLite: full SQL types incl. blobs and nulls | Modern desktop GIS, multi-layer projects |
| KML / KMZ | None (practical: tens of MB) | WGS 84 only | No (folders simulate) | Partial (Google Earth, some libs) | Strings + ExtendedData typed values | Google Earth, KMZ-distributed datasets |
| GML | None (practical: gigabytes) | Per-feature, any EPSG | Yes (named feature types) | No | XSD-typed: full XML type system | Government / INSPIRE, schema-bound exchange |
| TopoJSON | None (practical: hundreds of MB) | WGS 84 only | Multiple objects per file | Yes (with D3 / topojson-client) | Limited to JSON-serialisable | Topology-sharing web maps, choropleth data |
| WKT | None | None (CRS implicit or external) | No (one geometry per call) | Yes (libraries available) | None — geometry only | Database queries, spatial reference exchange |
| DXF | None (practical: hundreds of MB) | None (units only) | Layers within drawing | No | Limited (block attributes only) | CAD interchange, surveyor/architect handoff |
| CSV | None | None (lat/lon column convention) | No | Yes (every browser) | Strings only (typed downstream) | Tabular sensor data, point-cloud lists |
| PostGIS / SQL | Limited by Postgres (32 TB tables) | Per-column via SRID | Multiple tables/schemas | No | Full Postgres type system | Server-side analytics, transactional GIS |
| FlatGeobuf | None (practical: tens of GB) | Per-file, any EPSG | No | Yes (streaming reader) | Strict typed schema | Streaming web maps, cloud-optimised vector |
Notes on the columns
Max file size. "None" means there is no inherent limit in the spec, but practical limits exist (memory at read time, browser fetch ceilings). Shapefile's 2 GB is a hard 32-bit offset cap. GeoPackage's 140 TB is the SQLite limit nobody will ever hit.
CRS support. GeoJSON and TopoJSON are pinned to WGS 84 by their respective RFCs — embedding any other CRS makes the file non-conformant. Shapefile carries CRS in a sibling .prj file (easy to lose). GeoPackage and GML carry CRS per-layer and per-feature respectively, the most robust choice.
Multi-layer. Whether one file can carry several feature collections. GeoPackage is the only widely-deployed format that does this elegantly. GML can do it via named feature types. Everything else needs a workaround (ZIP, GeoJSON FeatureCollection conventions).
Browser-native. Does a typical web mapping library read this directly? GeoJSON yes everywhere. TopoJSON yes with a small companion library. CSV yes with parsing. FlatGeobuf yes with a streaming reader. Shapefile and GeoPackage no — you need to convert first or run a WASM-backed shim.
Attribute types. The expressivity of the column type system. Shapefile is the constraint here: 10-char names, no nulls, no booleans, dates without time. GeoPackage (SQLite) is the most flexible.
The decision in five common scenarios
- You're publishing a public dataset. Ship GeoPackage as primary + GeoJSON as a web-friendly secondary. Skip Shapefile unless legally required.
- You're building a Leaflet/Mapbox map. GeoJSON if under 5 MB, TopoJSON if topology-shared, FlatGeobuf if streaming a large layer.
- A government agency requires "GIS deliverables." Read the procurement spec verbatim. If it says Shapefile, ship Shapefile. If it just says "GIS-readable," ship GeoPackage.
- You're handing data to a CAD user. DXF. Coordinate units only — agree on CRS in the cover email.
- You're storing data for an application. PostGIS. Everything else is a file format.
What's not in the table
- Raster formats (GeoTIFF, COG, NetCDF, HDF5). Different beast — different table.
- Point clouds (LAS, LAZ, COPC). Another different beast.
- Tile formats (MBTiles, PMTiles, MapTiles). Distribution formats, not authoring.
For most working GIS at the vector layer, the 11 above cover every conversation.