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 "aspatial".
Read-write
The gpkg_contents
table SHALL contain a row with a lowercase data_type
column value of "aspatial" 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 - Aspatial' above are user tables or views 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 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 or view 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 or view SHALL NOT have a geometry column.
Columns in aspatial tables or views SHALL be defined using only the data types specified in Table 1 in Clause 1.1.1.1.3.
None
None