GeoPackageGPKGQGISApr 2026 · 9 min read

What is GeoPackage? The modern replacement for Shapefile

GeoPackage (file extension: .gpkg) is an open standard for storing geospatial data in a single, portable file. It was published by the Open Geospatial Consortium (OGC) in 2014 and has since been endorsed as the preferred replacement for Shapefile by a growing number of GIS organizations — including the UK Ordnance Survey, the US Federal Geographic Data Committee, and NATO.

If you have been working with Shapefiles for years and wondering whether the switch is worth it, this article will give you a straight answer.

What is under the hood?

A GeoPackage is a SQLite database file. That is it. SQLite is one of the most widely deployed database engines in the world — it runs on every smartphone, in every browser, and in most embedded systems. The OGC simply defined a standard schema on top of SQLite: specific tables for geometry, metadata, spatial reference systems, and tile data.

This design decision has enormous practical consequences. It means:

  • A GPKG is a single file — no .shp, .dbf, .shx, .prj juggling
  • You can query it with any SQLite tool, including Python's built-in sqlite3 module
  • It can store multiple layers in a single file (a polygon layer, a points layer, and a raster all in one .gpkg)
  • The file is robust — SQLite's ACID transactions mean you cannot end up with partially-written data

How it compares to Shapefile

FeatureShapefileGeoPackage
Number of files3–6 required files1 single .gpkg file
Field name limit10 charactersNo limit
File size limit2 GB per fileVirtually unlimited
Multiple layersNo (one layer per .shp)Yes — unlimited layers
Raster supportNoYes (tiles)
EncodingLimited, often Latin-1UTF-8 throughout
Geometry typesOne type per fileMultiple per layer
Open standardPartially (Esri-controlled)Fully open (OGC standard)

Real pain points it fixes

The 10-character field name limit

This is the most common complaint about Shapefiles. If you have a column called mean_annual_temperature, it gets truncated to something like mean_annua when saved as Shapefile. GPKG supports field names up to 64 characters by default (and this is a soft limit, not a hard one).

The 2 GB limit

Shapefile cannot exceed 2 GB per component file. For large national or global datasets, this is a real constraint. GeoPackage uses SQLite's page-based storage which supports files up to 140 TB on modern systems. In practice, even very large vector datasets fit comfortably.

Multiple layers in one file

A common GIS task is to send a client a roads layer, a boundaries layer, and a points-of-interest layer. With Shapefile, you zip three separate sets of files. With GeoPackage, you package them all in a single .gpkg file. The recipient opens one file in QGIS and sees all three layers in the layer panel.

Software support

GeoPackage support has been solid in mainstream tools since around 2016:

  • QGIS — Full read/write since QGIS 2.12 (2015). Now the recommended default format.
  • ArcGIS Pro — Full read/write since 2018. ArcMap has read-only support via the interoperability extension.
  • GDAL / ogr2ogr — Complete support since GDAL 1.11 (2014).
  • PostGIS — Can import/export GPKG via ogr2ogr.
  • Python (geopandas)gdf.to_file('output.gpkg', driver='GPKG')

The main gap is older Esri products (ArcMap, ArcCatalog) which have limited support. If you are sharing data with someone on ArcMap, Shapefile may still be the safer bet for now.

Should you switch?

If you are starting a new project or organizing data for your own use, yes — use GeoPackage. It solves real annoyances without introducing new ones. The file is just as portable, it opens in all the same tools, and you gain multi-layer support and proper field names for free.

If you are exchanging data with partners or clients, check what they need first. Most modern GIS environments handle GPKG fine, but if someone is on an older Esri workflow, Shapefile may still be safer for that specific handoff.

The longer-term direction of the industry is clear: governments and standards bodies are deprecating Shapefile recommendations in favour of GeoPackage. The switch is a matter of when, not if.

Working with GeoPackage in Python

GeoPandas reads and writes GeoPackage natively — no extra drivers needed beyond GDAL:

import geopandas as gpd

# Read a layer from a GeoPackage
gdf = gpd.read_file("data.gpkg", layer="roads")

# Write a GeoDataFrame to GeoPackage
gdf.to_file("output.gpkg", layer="roads", driver="GPKG")

# Append a second layer to the same file
gdf2.to_file("output.gpkg", layer="buildings", driver="GPKG")

Because a GPKG is a SQLite database, you can also inspect it with Python's built-insqlite3module — useful for listing available layers without loading all the data:

import sqlite3

conn = sqlite3.connect("data.gpkg")
layers = conn.execute(
    "SELECT table_name FROM gpkg_contents"
).fetchall()
print([row[0] for row in layers])  # ['roads', 'buildings', ...]

Creating a GeoPackage in QGIS

In QGIS, right-click any vector layer in the Layers panel → Export → Save Features As → set Format to GeoPackage, choose a file path and layer name, then click OK. To add a second layer to the same .gpkg file, use the same file path and a different layer name — QGIS will append the new layer without overwriting the first.

You can also convert from the command line using ogr2ogr:

# Shapefile → GeoPackage
ogr2ogr -f GPKG output.gpkg input.shp

# GeoJSON → GeoPackage with a named layer
ogr2ogr -f GPKG output.gpkg input.geojson -nln my_layer

Convert to or from GeoPackage

Convert your Shapefile, GeoJSON, or KML to GeoPackage format in seconds — free, no signup.

Related Articles