← All articles

By ·

Shapefile vs GeoPackage vs GeoParquet vs FlatGeobuf vs GeoJSON: Which Geospatial File Format to Use (Benchmarked)

Shapefile vs GeoPackage vs GeoParquet, benchmarked on 998,473 polygons: GeoParquet took 110 MB, the shapefile 494 MB. Which format to use for which job.

For most GIS work in 2026, store vector data in GeoPackage, publish large or analytical datasets as GeoParquet, serve map layers over HTTP as FlatGeobuf, and keep GeoJSON for small web payloads and APIs. On the same 998,473 polygons, GeoParquet took 110 MB, FlatGeobuf 314 MB, GeoPackage 335 MB, the shapefile 494 MB and GeoJSON 637 MB. Reading the whole layer took 1.2 seconds from GeoParquet and 19.7 seconds from GeoJSON.

This article compares the five formats you are most likely to meet (plus KML and CSV with WKT geometry) on limits, standards, tool support and cloud-native access, then reports a benchmark I ran on real hexagon data with the code to reproduce it, conversion commands for ogr2ogr, GeoPandas and DuckDB, and a decision table.

What are the main geospatial vector file formats?

There are five vector formats that cover nearly every project, and they differ mostly in whether they are a single file, whether they carry a spatial index and who maintains the specification.

FormatMaintained byStructureSpatial indexMain limits
Shapefile (.shp)Esri technical description (1998)3+ files (.shp, .shx, .dbf, usually .prj, .cpg)Optional separate file2 GB per file, 10-character field names, no time in dates
GeoPackage (.gpkg)OGC standard, current version 1.4One SQLite database, many layersR-tree inside the fileSingle writer at a time; awkward in object storage
GeoJSON (.geojson)IETF RFC 7946One text fileNoneLarge and slow above a few MB; WGS 84 only under the RFC
FlatGeobuf (.fgb)Open community specificationOne binary fileOptional packed Hilbert R-treeOne layer per file; not designed for editing in place
GeoParquet (.parquet)Community specification under an OGC Standards Working GroupOne columnar file (or a folder of them)Row-group bounding boxes, optional bbox columnAppend-only; desktop GIS support still catching up

Two more come up often:

GeoParquet versions matter. Version 1.0.0 was released in 2023, and 1.1.0 (June 2024) added the bounding-box "covering" column that makes spatial filtering fast. A 2.0.0 release candidate moves geometry onto the native GEOMETRY and GEOGRAPHY types that Apache Parquet added in 2025. The GeoParquet repository describes the specification as pending OGC approval, so check ogc.org for its current status before quoting it as an OGC standard in a contract.

Is the shapefile obsolete?

The shapefile still works, and every GIS reads it, but its limits make it a poor primary format for new data. The GDAL shapefile driver documentation lists them:

I saw two of these happen in my benchmark without any error, only warnings. GDAL renamed population_estimate to population and population_density_km2 to populati_1, and wrote the updated_at timestamp as a text field. GeoPackage, GeoJSON, FlatGeobuf and GeoParquet all returned the original names and a time-zone-aware timestamp.

That is why the GIS contractor checklist on this site puts GeoPackage first in the statement of work and accepts shapefiles only as a secondary copy with a field-name crosswalk.

How did I benchmark the formats?

I started from the population hexagons behind the Site Selection Showdown map: Kontur Population (1 November 2023 release) on H3 resolution-8 hexagons for Calgary, Islamabad and Bahawalpur. To get larger datasets with realistic geometry, I split each hexagon into its H3 children and divided its population equally among them. (The H3 resolution guide covers how the levels nest.)

DatasetHow it was builtPolygons
SmallCalgary, H3 resolution 8, as published1,205
MediumAll three cities, children at resolution 10 (49 per parent)142,639
LargeAll three cities, children at resolution 11 (343 per parent)998,473

Every layer has seven attributes, including a long field name and a UTC timestamp. Rows were sorted along a Hilbert curve so that features near each other on the map sit near each other in the file.

Method:

Software: Python 3.13, GeoPandas 1.2.0, pyogrio 0.13.0, GDAL 3.12.4, pyarrow 26.0.0, shapely 2.2.0 and DuckDB 1.5.5, on a 4-core Intel Xeon virtual machine at 2.1 GHz with 15 GB of RAM. Your timings will differ, sometimes by a lot. File sizes will not.

Which format is smallest and fastest to read?

GeoParquet was the smallest at every size and the fastest to read in full at the medium and large sizes, while FlatGeobuf and GeoPackage were fastest for small map-window queries.

Three bar charts for 998,473 polygons. File size: GeoParquet 110 MB, FlatGeobuf 314, GeoPackage 335, CSV 353, Shapefile 494, GeoJSON 637. Full read: GeoParquet 1.2 s, GeoPackage 1.7, FlatGeobuf 1.9, Shapefile 3.5, CSV 7.7, GeoJSON 19.7. Downtown bounding box read on a log scale: FlatGeobuf 15 ms, GeoPackage 27, GeoParquet 57, Shapefile 251, CSV 4,996, GeoJSON 16,145

Large dataset, 998,473 polygons. Red bars are the formats with a spatial index or row-group bounding boxes.

Full results for the large dataset:

FormatSize on diskWriteRead whole fileRead downtown box
GeoParquet110 MB2.6 s1.16 s57 ms
FlatGeobuf314 MB12.7 s1.94 s15 ms
GeoPackage335 MB11.7 s1.73 s27 ms
CSV (WKT)353 MB28.5 s7.73 s4,996 ms
Shapefile494 MB (5 files)18.1 s3.54 s251 ms
GeoJSON637 MB32.7 s19.68 s16,145 ms

The medium dataset (142,639 polygons) told the same story at a smaller scale: GeoParquet 16 MB, FlatGeobuf 45 MB, GeoPackage 48 MB, CSV 50 MB, shapefile 71 MB, GeoJSON 91 MB and KML 143 MB. KML took 5.0 seconds to read, GeoJSON 2.6 seconds, and the shapefile 0.57 seconds.

At 1,205 polygons none of this matters: every format read in under 41 ms. Choose for speed only once files reach tens of megabytes.

GeoJSON file size deserves a note, because it is the most common complaint. GDAL writes up to 15 significant digits per coordinate by default. Rounding to 6 decimal places, which is about 10 cm on the ground, cut the medium file from 91 MB to 73 MB. Gzip, which most web servers apply automatically, took it to 6.6 MB. If a GeoJSON is still too big after both, it is the wrong format for the job.

Which formats work for cloud-native access over HTTP?

FlatGeobuf, GeoPackage and spatially sorted GeoParquet can all answer a map-window query by downloading a small slice of a large file with HTTP range requests, while GeoJSON has to be downloaded in full. I served the large files from a local web server that logs every byte, then ran the same downtown query against each one through GDAL's /vsicurl/ reader (GeoParquet through pyarrow).

File (998,473 polygons)RequestsBytes transferredShare of file
FlatGeobuf, 314 MB575.5 MB1.7%
GeoPackage, 335 MB2013.8 MB1.1%
GeoParquet, Hilbert-sorted, 10,000-row groups, 110 MB44.6 MB4.2%
GeoParquet, unsorted, default row groups, 162 MB5162 MB100%
GeoJSON, 637 MB5181,274 MB200%

Three lessons:

  1. Request count matters as much as bytes. GeoPackage moved the fewest bytes but needed 201 round trips, because SQLite reads small pages. At 50 ms of latency to cloud storage, run one after another, that is about 10 seconds, against about 3 seconds for FlatGeobuf and a fraction of a second for GeoParquet.
  2. GeoParquet is only cloud-friendly if you write it that way. The same rows, shuffled and written with default settings, put everything into one row group, so the query downloaded the whole file. Sort spatially and use row groups of a few thousand to tens of thousands of rows.
  3. GeoJSON has no index. GDAL transferred the 637 MB file twice, because its GeoJSON reader makes a first pass to work out the fields before it returns features.

Shapefile vs GeoPackage: which should you use?

Use GeoPackage for anything you store, edit or deliver, and keep shapefiles as an export for software that cannot read anything else. GeoPackage is one file with as many layers as you like, keeps long field names, date-times and UTF-8 text, and has a built-in R-tree. In the benchmark it was 32% smaller than the shapefile, read in half the time and answered the downtown query nine times faster.

GeoPackage is the default format for new layers in QGIS, and ArcGIS Pro reads, edits and creates GeoPackages. GDAL reads and writes both through the GPKG and ESRI Shapefile drivers.

GeoParquet vs GeoPackage: when does GeoParquet win?

GeoParquet wins when the data is large, mostly read, and analysed with code or SQL. It is columnar and compressed, so it was a third of the GeoPackage's size, wrote in 2.6 seconds against 11.7, and loads directly into DuckDB, Apache Spark, BigQuery, pandas and GeoPandas without a GIS in between.

GeoPackage wins when people edit the data, when a delivery has several related layers with styles, or when the recipient works in desktop GIS. QGIS reads GeoParquet through GDAL's Parquet driver (GDAL builds that include Apache Arrow). ArcGIS Pro can add GeoParquet 1.0 and 1.1 files for display and query in recent releases, and handles FlatGeobuf through the Data Interoperability extension. Check the exact version your client runs before you promise either.

A common pattern is to keep both: GeoParquet as the analytical master in object storage, and GeoPackage extracts for the people who edit or map.

FlatGeobuf vs GeoJSON for web maps?

Use GeoJSON for small payloads, API responses and anything a person might open in a text editor. Use FlatGeobuf when a layer is too large to send to the browser in one go. In my test FlatGeobuf was half the size of GeoJSON, read ten times faster in full, and answered a map-window query with 1.7% of the file. Its index is a packed Hilbert R-tree at the front of the file, so the FlatGeobuf JavaScript library can stream just the features in view from any web host or bucket that supports range requests.

One more GeoJSON rule: RFC 7946 fixes coordinates to WGS 84 longitude and latitude in degrees. Store projected data in another format, and do not measure distances or areas on those degrees directly, as the Web Mercator distortion article explains.

How do you convert between formats?

GDAL's ogr2ogr converts between all of them on the command line, and GeoPandas does the same in Python.

# Shapefile to GeoPackage. SHAPE_ENCODING tells GDAL the .dbf encoding
# when the .cpg file is missing or wrong
ogr2ogr -f GPKG parcels.gpkg parcels.shp -nln parcels --config SHAPE_ENCODING UTF-8

# GeoPackage layer to FlatGeobuf, with its spatial index (on by default)
ogr2ogr -f FlatGeobuf parcels.fgb parcels.gpkg parcels

# GeoPackage to GeoParquet (needs GDAL built with Arrow/Parquet)
ogr2ogr -f Parquet parcels.parquet parcels.gpkg parcels \
  -lco COMPRESSION=ZSTD -lco ROW_GROUP_SIZE=10000 -lco SORT_BY_BBOX=YES

# Lean GeoJSON for the web: WGS 84, 6 decimal places
ogr2ogr -f GeoJSON parcels.geojson parcels.gpkg parcels \
  -t_srs EPSG:4326 -lco RFC7946=YES -lco COORDINATE_PRECISION=6
import geopandas as gpd

gdf = gpd.read_file("parcels.gpkg", layer="parcels", engine="pyogrio", use_arrow=True)

# Sort along a Hilbert curve so nearby features share row groups
gdf = gdf.iloc[gdf.geometry.hilbert_distance().argsort()]

gdf.to_parquet("parcels.parquet", write_covering_bbox=True,
               row_group_size=10_000, compression="zstd")
gdf.to_file("parcels.fgb", driver="FlatGeobuf", engine="pyogrio")

# Read only what you need
window = (-114.10, 51.03, -114.04, 51.06)
sub = gpd.read_parquet("parcels.parquet", bbox=window)
sub = gpd.read_file("parcels.fgb", bbox=window, engine="pyogrio")

Zstandard compression shrank the medium GeoParquet from 16.0 MB (the default Snappy) to 12.8 MB.

DuckDB queries GeoParquet in place with SQL. This query uses only the bounding-box column, runs on core DuckDB with no extensions, and returned 7,023 cells and 87,161 people from the large file in 16 ms:

SELECT city, count(*) AS cells, round(sum(population_estimate)) AS people
FROM 'hexes_large.parquet'
WHERE bbox.xmax >= -114.10 AND bbox.xmin <= -114.04
  AND bbox.ymax >= 51.03  AND bbox.ymin <= 51.06
GROUP BY city;

For exact geometry tests, load the spatial extension:

INSTALL spatial; LOAD spatial;

SELECT h3_id, population_estimate
FROM 'hexes_large.parquet'
WHERE ST_Intersects(geometry,
      ST_GeomFromText('POLYGON((-114.10 51.03, -114.04 51.03, -114.04 51.06,
                                -114.10 51.06, -114.10 51.03))'));

Which format should you use for which job?

JobUseWhy
Deliverable to a client or another teamGeoPackageOne file, many layers, open OGC standard, opens everywhere
Editing in QGIS or ArcGIS ProGeoPackage (or a file geodatabase in ArcGIS shops)Supports edits, indexes, long names, date-times
Large analytical master in a data lake or bucketGeoParquet, Hilbert-sorted, row groups of 10,000 to 100,000Smallest, fastest full reads, SQL-ready
Large layer streamed to a web map from static hostingFlatGeobufFetches only the features in view over HTTP
Small layer in a web app or API responseGeoJSON (6 decimals, gzip)Native to JavaScript, readable
Legacy software that only reads shapefilesShapefile export plus field crosswalkCompatibility only
A few placemarks for Google Earth usersKMLOpens in Google Earth with no GIS
Points for a spreadsheet userCSV with lat/lon or WKT, plus a data dictionaryOpens in Excel; types are lost

Whatever you pick, write the format, the coordinate system and the field definitions into the contract or the README. A format choice without a data dictionary just moves the confusion somewhere else.

What should you take from this?

GeoPackage is the safe default and should replace the shapefile for anything stored or delivered. Once a layer reaches hundreds of thousands of features, GeoParquet is several times smaller and faster, provided you sort it spatially and keep row groups modest. FlatGeobuf is the simplest way to put a large layer on a web map without a tile server. GeoJSON is for small things. And timings vary by machine, but the size and indexing differences in this test are large enough that they will show up on yours.

If you need a data pipeline, a delivery specification or a cloud-native layer built for your organisation, email me at mahad.imran29@gmail.com.

Frequently asked questions

Is the shapefile obsolete?

For new work, mostly yes. A shapefile is at least three files, each capped at 2 GB, field names are cut to 10 characters, and date fields cannot hold a time. In my test GDAL renamed population_density_km2 to populati_1 and stored a timestamp as text. Shapefiles are still worth delivering as a secondary copy for older software, with a field-name crosswalk.

Should I use GeoPackage or shapefile?

Use GeoPackage. It is an open OGC standard, one file holds many layers, field names and date-times survive, and it has a built-in spatial index. On 998,473 polygons the GeoPackage was 335 MB against 494 MB for the shapefile, read in half the time, and answered a small map-window query in 27 ms against 251 ms.

Is GeoParquet better than GeoPackage?

For large analytical datasets, usually. In my benchmark GeoParquet was a third of the size of the GeoPackage (110 MB vs 335 MB), wrote more than four times faster and reads straight into DuckDB, Spark and pandas. GeoPackage is better for editing, desktop GIS, multiple layers with styles, and handing data to people who use QGIS or ArcGIS Pro.

What is the difference between FlatGeobuf and GeoJSON?

GeoJSON is human-readable text with no index, so any query reads the whole file. FlatGeobuf is binary with an optional packed Hilbert R-tree, so a client can fetch only the features in view with HTTP range requests. On a 998,473-polygon layer, a downtown query read 5.5 MB of a 314 MB FlatGeobuf file. The same query on GeoJSON transferred more than the whole 637 MB file.

Why is my GeoJSON file so large and how do I make it smaller?

GeoJSON stores every coordinate as text, often with 15 significant digits, and repeats every property name for every feature. Rounding to 6 decimal places (about 10 cm) cut my 142,639-polygon file from 91 MB to 73 MB, and gzip took it to 6.6 MB. For large data, switch to FlatGeobuf or GeoParquet instead.

Let's talk.

Best way to reach me is email. I respond to most things.