GISBox

GPKG(GeoPackage)

GISBox is a one-stop 3D GIS data editing, conversion and publishing platform that supports editing in multiple GIS formats such as OSGB/GEOTIFF/RVT, converting to 3DTiles/Terrain and publishing.

Introduction

GeoPackage (GPKG) is an open standard geospatial data storage format launched by OGC (Open Geospatial Consortium). It is based on SQLite database files and can efficiently store and manage vector data, raster data, and other spatial related information. GPKG files are designed to solve the problems of fragmentation and poor compatibility of traditional GIS file formats, and support offline data storage and cross-platform data sharing through a unified format. Compared with traditional GIS files (such as Shapefile or GeoTIFF), GPKG files have greater flexibility and scalability and are considered to be an ideal choice for modern geographic information applications.

File Structure

  1. Basic features
  • File extension: .gpkg
  • Underlying architecture: Based on SQLite database, it supports standard SQL queries.
  • Spatial reference: Supports multiple coordinate systems (including EPSG:4326 and custom coordinate systems).
  • Data types: Can store vector data (points, lines, and surfaces), raster data (such as images), style information, and metadata at the same time.
  1. Data table structure
  • gpkg_contents: Records all data contents in the file, including metadata such as data type and spatial range.
  • gpkg_geometry_columns: Defines the geometry type and coordinate reference system of vector data.
  • gpkg_tile_matrix_set and gpkg_tile_matrix: Used to store tile information of raster data.
  • Custom tables: Users can extend their own tables to store non-spatial data for specific applications.

Pros

1. Single file storage: No need to manage multiple files (such as Shapefile’s .shp, .dbf, .prj, etc.), all data is stored in a .gpkg file, which is easy to transfer and backup.

2. Efficient storage and query: Based on the SQLite architecture, it supports SQL query and index, and processes spatial data faster.

3. Support multiple data types: It can store both vector data and raster data, reducing the trouble of format conversion.

4. Open standards: Free, open source, easy to expand, and not restricted by patents.

5. Cross-platform compatibility: It supports multiple operating systems such as Windows, Linux, macOS, and is widely supported by multiple GIS tools.

6. Strong scalability: Users can add custom tables or attributes to files to meet specific needs.

Cons

1. File size limitation: The size of a single GPKG file is limited by the SQLite database, which is about 140 TB at most, but it may not be as efficient as specialized raster formats (such as GeoTIFF) in large-scale data scenarios (such as global high-resolution rasters).

2. Increased complexity: Compared with the simplicity of Shapefile, GPKG files require a higher learning cost due to their versatility.

3. Write speed limitation: For frequent write operations or real-time data streams, the write performance may not be as good as specific optimized binary formats (such as Parquet).

4. Tool support differences: Although mainstream GIS software supports GPKG, some niche tools may not be fully compatible with its extended functions.

Application Scenario

The flexibility and efficiency of GPKG make it an ideal choice for geospatial data management and sharing. In urban planning, GPKG files are used to store large-scale vector data and high-resolution raster data, supporting analysis and map production in offline environments.

Example

  1. An overview of the GeoPackage table.

  1. Layer in ROI.gpkg.

File Opening Mode

  1. gpkg file opened in QGIS.

Related GIS files

DAT

KMZ

ID

TAB

References

  1. https://en.wikipedia.org/wiki/GeoPackage
  2. https://wiki.openstreetmap.org/wiki/GeoPackage
  3. https://www.geopackage.org/guidance/getting-started.html