The OGC GeoPackage standard was adopted prior to the adoption of "12-063r5 OGC Well known text representation of Coordinate Reference Systems" [I34], in 13 August, 2014. As a result, the OGC GeoPackage standard references an older document [I32] which has known ambiguities that are being encountered in the field. This extension establishes a new column to contain values that conform to the new standard. OGC later adopted "18-010r7 OGC Well known text representation of Coordinate Reference Systems" [I36], in 6 June, 2019 as a revision to 12-063r5.
GeoPackage SWG, author_name gpkg
.
gpkg_crs_wkt
Extension of Existing Requirement in clause [spatial_ref_sys_data_table_definition].
Applies to the gpkg_spatial_ref_sys
table.
Read-write
For GeoPackages conforming to this extension, the gpkg_spatial_ref_sys
table SHALL have an additional column called definition_12_063
as per Table 1 and gpkg_spatial_ref_sys Table Definition SQL (CRS WKT Extension).
Column Name | Column Type | Column Description | NOT NULL flag | Key |
---|---|---|---|---|
|
TEXT |
Human readable name of this SRS |
true |
|
|
INTEGER |
Unique identifier for each Spatial Reference System within a GeoPackage |
true |
PK |
|
TEXT |
Case-insensitive name of the defining organization e.g. EPSG or epsg |
true |
|
|
INTEGER |
Numeric ID of the Spatial Reference System assigned by the organization |
true |
|
|
TEXT |
Well-known Text [I32] Representation of the Spatial Reference System |
true |
|
|
TEXT |
Human readable description of this SRS |
false |
|
|
TEXT |
Well-known Text [I34] or [I36] Representation of the Spatial Reference System |
true |
Note
|
Previous versions of this extension specified default values for |
GeoPackages with a row in the gpkg_extensions
table with an extension_name
of "gpkg_crs_wkt" SHALL comply with this extension.
GeoPackages complying with this extension SHALL have a row in the gpkg_extensions
table as described in Table 2 (below).
Warning
|
Requirement 145 has been updated as part of GeoPackage 1.2.1.
In 1.1.0 and 1.2.0, the |
table_name | column_name | extension_name | definition | scope |
---|---|---|---|---|
|
|
|
see note below |
|
Note
|
For the |
Note
|
For backwards compatibility, only use common WKT values between 12-063 and 18-010. Additional WKT values in 18-010r7 can be used when required in the CRS definition. |
At least one definition column SHALL be defined with a valid definition unless the value of the srs_id
column is 0
or -1
. Both columns SHOULD be defined. If it is not possible to produce a valid [I32] definition then the value of the definition
column MAY be undefined
. If it is not possible to produce a valid [I34] or [I36] definition then the value of the definition_12_063
column MAY be undefined
.
Note
|
If, for a particular row, both the |
Table Definition
Test Case ID |
/extension_crs_wkt/table_def |
Test Purpose |
Verify that the gpkg_spatial_ref_sys table exists and has the correct definition. Extends |
Test Method |
|
Reference |
Annex F.10 Req 115 |
Test Type |
Basic |
Test Case ID |
/extensions/crs_wkt/extensions/data_values |
Test Purpose |
Verify that the gpkg_extensions table has the required row. |
Test Method |
|
Reference |
Annex F.10 Req 145 |
Test Type: |
Capabilities |
Test Case ID |
/extension_crs_wkt/data_values_default |
Test Purpose |
Verify that the gpkg_spatial_ref_sys table contains the required default contents. Extends |
Test Method |
|
Reference |
Annex F.10 Req 116 |
Test Type |
Capability |
Test Case ID |
/extension_crs_wkt/data_values_required |
Test Purpose |
Verify that the spatial_ref_sys table contains rows to define all srs_id values used by features and tiles in a GeoPackage. Extends |
Test Method |
|
Reference |
Annex F.10 Req 117 |
Test Type |
Capability |
CREATE TABLE gpkg_spatial_ref_sys (
srs_name TEXT NOT NULL,
srs_id INTEGER NOT NULL PRIMARY KEY,
organization TEXT NOT NULL,
organization_coordsys_id INTEGER NOT NULL,
definition TEXT NOT NULL,
description TEXT,
definition_12_063 TEXT NOT NULL
);