Go back


This extension provides a means to store metadata in a GeoPackage and to relate it to content already in the GeoPackage.


To use this extension, add the following rows to this table.

table_name column_name extension_name definition scope
gpkg_metadata NULL gpkg_metadata read-write
gpkg_metadata_reference NULL gpkg_metadata read-write


Add a row to this table for each metadata document.

Column Value
id primary key
md_scope Metadata Scope - default “dataset”
md_standard_uri URI reference to the metadata structure definition authority (e.g., for NMIS)
mime_type MIME encoding of metadata (e.g., text/xml)
metadata The actual metadata document


Add a row to this table for each GeoPackage, table, column, row, or row/column that has a metadata document. Multiple rows can refer to a single gpkg_metadata entry. It is also possible for an element (geopackage, table, column, row, or row/column) to have multiple metadata documents.

Column Value
reference_scope one of “geopackage”, “table”, “column”, “row”, or “row/col”
table_name user-defined table name (or NULL for whole GeoPackage)
column_name for reference_scope of “column” or “row/col”, column name in user-defined table (NULL otherwise)
row_id_value for reference_scope of “row” or “row/col”, the row ID (NULL otherwise)
timestamp timestamp value in ISO 8601 format
md_file_id Foreign key to gpkg_metadata
md_parent_id Foreign key to the parent metadata document (if applicable, NULL otherwise)