Aspatial Support
Support for aspatial data (ie. SQLite tables/views without a geometry column), potentially with associated metadata.
GDAL - Geospatial Data Abstraction Library, author_name gdal
.
INSERT INTO gpkg_extensions
(table_name, column_name, extension_name, definition, scope)
VALUES
(
NULL,
NULL,
'gdal_aspatial',
'http://gdal.org/geopackage_aspatial.html',
'read-write'
);
Extension of Existing Requirement in Clause 2.
This extension applies to any aspatial user data table or view specified in the gpkg_contents
table with a lowercase data_type
column value of "rows".
Read-write
The gpkg_contents
table SHALL contain a row with a lowercase data_type
column value of "rows" for each aspatial user data table or view.
The second component of the SQL schema for aspatial tables in an Extended GeoPackage described in clause 'Contents Table - Rows' above are user tables that contain aspatial user data.
An Extended GeoPackage with aspatial support is not required to contain any user data tables. User data tables MAY be empty.
An Extended GeoPackage with aspatial support MAY contain tables or updateable views. Every such aspatial table or view MAY have a column with column type INTEGER and PRIMARY KEY AUTOINCREMENT column constraints per EXAMPLE.
Column Name | Type | Description | Null | Default | Key |
---|---|---|---|---|---|
id |
INTEGER | Autoincrement primary key | no | PK | |
text_attribute |
TEXT | Text attribute of row | yes | ||
real_attribute |
REAL | Real attribute of row | yes | ||
boolean_attribute |
BOOLEAN | Boolean attribute of row | yes | ||
raster_or_photo |
BLOB | Photograph | yes |
An integer primary key of an aspatial table allows features to be linked to row level metadata records in the gpkg_metadata
table by rowid values in the gpkg_metadata_reference
table as described in clause 2.4.3 Metadata Reference Table.
An aspatial table SHALL not have a geometry column.
None
None