Introduction
GeoPackage is an Open Geospatial Consortium standard, first published in 2014, for map data in a single file. It can hold any number of vector layers, of points, lines and polygons with their attributes, and raster tile sets, together with their coordinate systems. It is the default format of QGIS and is widely used in place of the shapefile, whose limits it does not share.
Structure
A GeoPackage is an SQLite 3 database, so it
starts with SQLite format 3. The application ID in the SQLite header,
at offset 68, is GPKG, and the user version at offset 60 gives the
GeoPackage version, such as 10200 for 1.2.
Required tables describe the contents: gpkg_spatial_ref_sys lists the
coordinate systems, gpkg_contents lists every layer, and
gpkg_geometry_columns says which column of each feature table holds the
geometry. Each layer is an ordinary table with one row per feature. Geometries are
stored as blobs: a short header starting with the bytes GP, with the
version, flags, coordinate system and an optional bounding box, followed by the shape in
the standard well-known binary form. Tile sets are tables of image blobs indexed by zoom
level, column and row.
Links
Software
- QGIS (Windows, macOS, Linux)
- ArcGIS Pro (Windows)
- GDAL and its
ogr2ogrconverter (Windows, macOS, Linux)
Developers
Reference
- GeoPackage, with the OGC specification