Modern Vector & Raster Database.gpkgMIME: application/geopackage+sqlite3

GeoPackage

The OGC-standard SQLite container that's quietly replacing Shapefile.

Specification
OGC GeoPackage Encoding Standard 1.3
Released
2014
When to use
Use GeoPackage when you want a single portable file that holds multiple vector layers, raster tiles, attribute tables, and spatial indexes — without the fragility of Shapefile or the bloat of GeoJSON. It is the default choice for modern desktop GIS projects, field data collection apps, and any case where you'd previously have shipped a folder of Shapefiles.

What is GeoPackage?

GeoPackage is an OGC (Open Geospatial Consortium) standard introduced in 2014 and now at version 1.3. Physically, a .gpkg file is a SQLite 3 database — open it in any SQLite browser and you'll see ordinary tables. What makes it a GeoPackage rather than a generic SQLite file is a set of mandatory metadata tables defined by the standard: gpkg_contents lists every spatial layer, gpkg_geometry_columns describes geometry columns and their CRS, and gpkg_spatial_ref_sys stores CRS definitions in WKT. Feature geometries are stored as binary blobs in a slight extension of the OGC Well-Known Binary (WKB) format, prefixed with a small header containing the SRID and an envelope. Spatial indexing uses SQLite's R*Tree module, exposed as virtual tables that are kept in sync with feature tables via triggers. Because it is built on SQLite, GeoPackage inherits ACID transactions, full SQL query support, and a single-file footprint that survives email and USB drives equally well. The standard also supports raster tiles (tile matrix sets), attribute-only tables, and extensions for vector tiles, related features, and styling.

Supported by

  • QGIS (preferred native format since 3.x)
  • ArcGIS Pro 2.0+
  • GDAL/OGR (driver: GPKG)
  • PostGIS (via ogr2ogr)
  • Python geopandas, fiona
  • R sf package
  • FME, Global Mapper, Manifold
  • GeoServer (data store)
  • Most mobile field-collection apps (QField, Mergin Maps, ArcGIS Field Maps)

Strengths

  • Single file — like Shapefile bundled into one .gpkg
  • Multiple layers per file with different geometry types and CRSs
  • Built-in R*Tree spatial index, queries scale to millions of features
  • Full SQL — JOIN attribute tables, run spatial predicates, aggregate
  • Unicode by default (UTF-8), unlimited attribute name length
  • Open OGC standard, no licensing concerns
  • Stores both vector and raster (tile pyramid)
  • ACID transactions — power loss won't corrupt the database

Weaknesses

  • Not human-readable; binary blobs require a tool to inspect
  • Older versions of ArcGIS (10.x) cannot read it directly
  • Web browsers cannot consume it without a server
  • Concurrent multi-writer access is limited (SQLite locking)
  • File-system size is fixed once allocated; VACUUM is needed to reclaim space after large deletes

Converters for GeoPackage

Validator

GeoPackage Validator

Validate a GeoPackage file for SQLite integrity, spatial tables, and geometry compliance.

Frequently Asked Questions

Is GeoPackage just a SQLite file?

Every GeoPackage is a SQLite file, but not every SQLite file is a GeoPackage. The format adds three mandatory metadata tables (gpkg_contents, gpkg_geometry_columns, gpkg_spatial_ref_sys), a binary geometry encoding, and R*Tree spatial indexes wired up via triggers. You can open a .gpkg in any SQLite browser, but you'll only see geometry layers correctly in software that understands the GeoPackage standard.

Why is GeoPackage replacing Shapefile?

GeoPackage fixes every long-standing Shapefile pain: it's a single file instead of a bundle, has no field-name length limit, supports Unicode natively, stores multiple layers, indexes spatially out of the box, has no 2 GB size cap, and is a true open standard rather than a vendor format. Both QGIS (since 3.x) and the OGC actively recommend it for new projects.

Can I edit a GeoPackage in two programs at once?

Not safely. SQLite uses file-level locking, so simultaneous writers will block or fail. For multi-user workflows use PostGIS as the master database and export to GeoPackage for distribution.

How do I check what layers are inside a .gpkg?

Run `ogrinfo your.gpkg` from the command line, or open the file in QGIS — the browser panel will list every layer. Programmatically you can SELECT * FROM gpkg_contents to see registered layers along with their geometry type and CRS.

Does GeoPackage support raster data?

Yes. The standard defines a tile matrix encoding that stores raster pyramids alongside vector data. This makes it useful for offline base maps in mobile field apps.

Related Formats