GeoPackage FormatΒΆ

The GeoPackage is an open and standard format, portable and platform independent.

The format describes rules for storing geospatial data (vector and raster) within a SQLite database.

The format requires a SQLite database file with .gpkg extension.

Tables Overview

../_images/geopackage-tables-overview.png

gpkg_spatial_ref_sys

This table contains records to define all spatial reference systems used by the table contents in the GeoPacakge itself.

../_images/geopackage-table-gpkg_spatial_ref_sys-0.png
Where:
  1. srs_name: name of the SRS
  2. srs_id: unique identifier for each SRS within the database
  3. organization: name of the defininig organization
  4. organization_coordsys_id: numeric ID of the SRS assigned by the organization
  5. definition: WKT representation of the SRS
  6. description: description of the SRS
../_images/geopackage-table-gpkg_spatial_ref_sys-1.png

gpkg_geometry_columns

This table identifies the geometry columns and geometry types in tables that contain user data representing features.

../_images/geopackage-table-gpkg_geometry_columns-0.png
Where:
  1. table_name: name of the geometry table
  2. column_name: name of the geometry column
  3. geometry_type_name: name of the geometry type (eg. POINT, POLYGON)
  4. srs_id: SRS ID of the data in the geometry column
  5. z: enumerator for Z values (0: prohibited, 1: mandatory, 2: optional)
  6. m: enumerator for M values (0: prohibited, 1: mandatory, 2: optional)
../_images/geopackage-table-gpkg_geometry_columns-1.png

gpkg_contents

../_images/geopackage-table-gpkg_contents-0.png
Where:
  1. table_name: name of the actual content table
  2. data_type: type of the data stored in the table (eg. tiles, features, attributes) table
  3. identifier: a short name identifier for the table_name content
  4. description: a description for the table_name content
  5. last_change: timestamp of the last change of the content
  6. min_x: minimum Easting or Longitude for all content in the table
  7. min_y: minimum Northing or Latitude for all content in the table
  8. max_x: maximum Easting or Longitude for all content in the table
  9. max_y: maximum Northing or Latitude for all content in the table
  10. srs_id: Spatial reference System ID (referencing gpkg_sptial_ref_sys.srs_id)
../_images/geopackage-table-gpkg_contents-1.png

gpkg_tile_matrix_set This table contains coordinates that define a bounding box as the exact stated spatial extent for all tiles in a tile (matrix set) table. If the geographic extent of the image data contained in tiles at a particular zoom level is within but not equal to this bounding box, then the non-image area of matrix edge tiles must be padded with no-data values, preferably transparent ones.

../_images/geopackage-table-gpkg_tile_matrix_set-0.png
Where:
  1. table_name: name of the Tile Pyramid table
  2. srs_id: Spatial reference System ID (referencing gpkg_sptial_ref_sys.srs_id)
  3. min_x: minimum Easting or Longitude for the tile matrix set
  4. min_y: minimum Northing or Latitude for the tile matrix set
  5. max_x: maximum Easting or Longitude for the tile matrix set
  6. max_y: maximum Northing or Latitude for the tile matrix set
../_images/geopackage-table-gpkg_tile_matrix_set-1.png

gpkg_tile_matrix

../_images/geopackage-table-gpkg_tile_matrix-0.png
Where:
  1. table_name: name of the Tile Pyramid table
  2. zoom_level: zoom level
  3. matrix_width: number of columns for the specific zoom_level
  4. matrix_height: number of rows for the specific zoom_level
  5. tile_width: tile width in pixels for the specific zoom level
  6. tile_height: tile height in pixels for the specific zoom level
  7. pixel_x_size: width of the pixel in the table SRID unit (default meters)
  8. pixel_y_size: height of the pixel in the table SRID unit (default meters)
../_images/geopackage-table-gpkg_tile_matrix-1.png