diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST001.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST001.adoc index b85771d8..6a2c41ae 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST001.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST001.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |====================================================================================================== -|*Test Case ID* |`/extensions/elevation/table_def/gpkg_2d_gridded_coverage_ancillary` +|*Test Case ID* |`/extensions/coverage/table_def/gpkg_2d_gridded_coverage_ancillary` |*Test Purpose:* |Verify that the "gpkg_2d_gridded_coverage_ancillary" table has the proper definition. |*Test Method:* a| 1. `PRAGMA table_info(gpkg_2d_gridded_coverage_ancillary)` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST002.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST002.adoc index ec4fd685..150a1c98 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST002.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST002.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |================================================================================================== -|*Test Case ID* |`/extensions/elevation/table_def/gpkg_2d_gridded_tile_ancillary` +|*Test Case ID* |`/extensions/coverage/table_def/gpkg_2d_gridded_tile_ancillary` |*Test Purpose:* |Verify that the "gpkg_2d_gridded_tile_ancillary" table has the proper definition. |*Test Method:* a| 1. `PRAGMA table_info(gpkg_2d_gridded_tile_ancillary)` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST003.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST003.adoc index 9fb17650..434c738a 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST003.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST003.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |======================================================================================================================================= -|*Test Case ID* |`/extensions/elevation/table_val/gpkg_spatial_ref_sys/rows` +|*Test Case ID* |`/extensions/coverage/table_val/gpkg_spatial_ref_sys/rows` |*Test Purpose:* |Verify that the "gpkg_spatial_ref_sys" table has the required rows. |*Test Method:* a| 1. `SELECT COUNT(*) FROM gpkg_spatial_ref_sys WHERE organization_coordsys_id = 4979 AND (organization = _EPSG_ OR organization = _epsg_)` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST004.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST004.adoc index 544334af..2343de82 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST004.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST004.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |=================================================================================================== -|*Test Case ID* |`/extensions/elevation/table_val/gpkg_spatial_ref_sys/refs` +|*Test Case ID* |`/extensions/coverage/table_val/gpkg_spatial_ref_sys/refs` |*Test Purpose:* |Verify that all elevation data uses an SRS that is defined in gpkg_spatial_ref_sys |*Test Method:* a| 1. `SELECT table_name FROM gpkg_contents WHERE data_type = _2d-gridded-coverage_;` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST005.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST005.adoc index b8a7a40c..33c447a7 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST005.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST005.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |=================================================================================================== -|*Test Case ID* |`/extensions/elevation/table_val/gpkg_spatial_ref_sys` +|*Test Case ID* |`/extensions/coverage/table_val/gpkg_spatial_ref_sys` |*Test Purpose:* |Verify that all elevation data uses an SRS that is defined in gpkg_spatial_ref_sys |*Test Method:* a| 1. `SELECT table_name FROM gpkg_contents WHERE data_type = _2d-gridded-coverage_;` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST006.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST006.adoc index bdb7004d..7a9ff905 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST006.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST006.adoc @@ -1,13 +1,13 @@ [cols=",",options="header",] |============================================================================================================================================= -|*Test Case ID* |`/extensions/elevation/table_val/gpkg_extensions` +|*Test Case ID* |`/extensions/coverage/table_val/gpkg_extensions` |*Test Purpose:* |Verify that all required rows are present in gpkg_extensions |*Test Method:* a| 1. `SELECT table_name, column_name, extension_name, definition, scope from gpkg_extensions";` 2. Verify that the required rows in Table 3 for table_name gpkg_2d_gridded_coverage_ancillary and gpkg_2d_gridded_tile_ancillary are present. 3. SELECT table_name FROM gpkg_contents WHERE data_type = _2d-gridded-coverage_; 4. For each table_name -a. `SELECT column_name, definition, scope from gpkg_extensions WHERE extension_name = _gpkg_elevation_tiles_ AND table_name = _\{table_name}_` +a. `SELECT column_name, definition, scope from gpkg_extensions WHERE extension_name = _gpkg_2d_gridded_coverage_ AND table_name = _\{table_name}_` b. Fail if no rows found c. Fail if the results do not match the entry in Table 30 for a user defined table 5. Pass if no fails diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST007.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST007.adoc index 29ac4fe7..2fd7c7ef 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST007.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST007.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |======================================================================================================= -|*Test Case ID* |`/extensions/elevation/table_ref/gpkg_contents/gpkg_2d_gridded_coverage_ancillary` +|*Test Case ID* |`/extensions/coverage/table_ref/gpkg_contents/gpkg_2d_gridded_coverage_ancillary` |*Test Purpose:* |Verify that all required rows are present in gpkg_2d_gridded_coverage_ancillary |*Test Method:* a| 1. `SELECT table_name FROM gpkg_contents WHERE data_type = _2d-gridded-coverage_;` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST008.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST008.adoc index aa76cc07..d1edb0b2 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST008.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST008.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |======================================================================================================= -|*Test Case ID* |`/extensions/elevation/table_ref/gpkg_2d_gridded_coverage_ancillary/gpkg_tile_matrix_set` +|*Test Case ID* |`/extensions/coverage/table_ref/gpkg_2d_gridded_coverage_ancillary/gpkg_tile_matrix_set` |*Test Purpose:* |Verify that gpkg_2d_gridded_coverage_ancillary references gpkg_tile_matrix_set |*Test Method:* a| 1. `SELECT tile_matrix_set_name FROM _gpkg_2d_gridded_coverage_ancillary_;` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST009.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST009.adoc index b77897c8..fb5e3367 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST009.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST009.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |========================================================================================================================================================================================= -|*Test Case ID* |`/extensions/elevation/table_val/gpkg_2d_gridded_coverage_ancillary` +|*Test Case ID* |`/extensions/coverage/table_val/gpkg_2d_gridded_coverage_ancillary` |*Test Purpose:* |Verify that gpkg_2d_gridded_coverage_ancillary contains valid column values |*Test Method:* a| 1. `SELECT datatype, scale, offset FROM _gpkg_2d_gridded_coverage_ancillary_ WHERE tile_matrix_set_name IN (SELECT table_name FROM gpkg_contents WHERE data_type = _2d-gridded-coverage_);` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST010.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST010.adoc index 27408494..1aa948b3 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST010.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST010.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |============================================================================================================================================================================================================================================================================= -|*Test Case ID* |`/extensions/elevation/table_ref/tpudt/gpkg_2d_gridded_tile_ancillary` +|*Test Case ID* |`/extensions/coverage/table_ref/tpudt/gpkg_2d_gridded_tile_ancillary` |*Test Purpose:* |Verify that all required rows are present in gpkg_2d_gridded_tile_ancillary |*Test Method:* a| 1. `SELECT table_name FROM gpkg_contents WHERE data_type = _2d-gridded-coverage_;` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST011.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST011.adoc index e8ae317e..fb22685c 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST011.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST011.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |======================================================================================================= -|*Test Case ID* |`/extensions/elevation/table_val/gpkg_2d_gridded_tile_ancillary` +|*Test Case ID* |`/extensions/coverage/table_val/gpkg_2d_gridded_tile_ancillary` |*Test Purpose:* |Verify that all required rows in gpkg_2d_gridded_tile_ancillary have valid values |*Test Method:* a| 1. `SELECT tpudt_name, scale, offset FROM gpkg_2d_gridded_tile_ancillary;` diff --git a/spec/2d-gridded-coverage/abstract_tests/TEST012.adoc b/spec/2d-gridded-coverage/abstract_tests/TEST012.adoc index c0fdff88..c76f12c3 100644 --- a/spec/2d-gridded-coverage/abstract_tests/TEST012.adoc +++ b/spec/2d-gridded-coverage/abstract_tests/TEST012.adoc @@ -1,6 +1,6 @@ [cols=",",options="header",] |============================================================================================================================================================================== -|*Test Case ID* |`/extensions/elevation/table_val/tpudt` +|*Test Case ID* |`/extensions/coverage/table_val/tpudt` |*Test Purpose:* |Verify that all rows in tile pyramid user data tables have valid values |*Test Method:* a| 1. `SELECT table_name FROM gpkg_contents WHERE data_type = _2d-gridded-coverage_;` diff --git a/spec/2d-gridded-coverage/annex-c.adoc b/spec/2d-gridded-coverage/annex-c.adoc index a2ca55ca..fd022048 100644 --- a/spec/2d-gridded-coverage/annex-c.adoc +++ b/spec/2d-gridded-coverage/annex-c.adoc @@ -7,35 +7,20 @@ [source,sql] ---- CREATE TABLE 'gpkg_2d_gridded_coverage_ancillary' ( - -id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - -tile_matrix_set_name TEXT NOT NULL UNIQUE, - -datatype TEXT NOT NULL DEFAULT 'integer', - -scale REAL NOT NULL DEFAULT 1.0, - -offset REAL NOT NULL DEFAULT 0.0, - -precision REAL DEFAULT 1.0, - -data_null REAL, - -grid_cell_encoding TEXT DEFAULT 'grid-value-is-center', - -uom TEXT, - -field_name TEXT DEFAULT 'Height', - -quantity_definition TEXT DEFAULT 'Height', - -CONSTRAINT fk_g2dgtct_name FOREIGN KEY('tile_matrix_set_name') REFERENCES - -gpkg_tile_matrix_set ( table_name ) - -CHECK (datatype in ('integer','float'))); - + id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + tile_matrix_set_name TEXT NOT NULL UNIQUE, + datatype TEXT NOT NULL DEFAULT 'integer', + scale REAL NOT NULL DEFAULT 1.0, + offset REAL NOT NULL DEFAULT 0.0, + precision REAL DEFAULT 1.0, + data_null REAL, + grid_cell_encoding TEXT DEFAULT 'grid-value-is-center', + uom TEXT, + field_name TEXT DEFAULT 'Height', + quantity_definition TEXT DEFAULT 'Height', + CONSTRAINT fk_g2dgtct_name FOREIGN KEY('tile_matrix_set_name') REFERENCES gpkg_tile_matrix_set (table_name), + CHECK (datatype in ('integer','float')) +); ---- @@ -44,27 +29,16 @@ CHECK (datatype in ('integer','float'))); [source,sql] ---- CREATE TABLE gpkg_2d_gridded_tile_ancillary ( - -id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - -tpudt_name TEXT NOT NULL, - -tpudt_id INTEGER NOT NULL, - -scale REAL NOT NULL DEFAULT 1.0, - -offset REAL NOT NULL DEFAULT 0.0, - -min REAL DEFAULT NULL, - -max REAL DEFAULT NULL, - -mean REAL DEFAULT NULL, - -std_dev REAL DEFAULT NULL, - -CONSTRAINT fk_g2dgtat_name FOREIGN KEY (tpudt_name) REFERENCES gpkg_contents(table_name), - -UNIQUE (tpudt_name, tpudt_id)); - + id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + tpudt_name TEXT NOT NULL, + tpudt_id INTEGER NOT NULL, + scale REAL NOT NULL DEFAULT 1.0, + offset REAL NOT NULL DEFAULT 0.0, + min REAL DEFAULT NULL, + max REAL DEFAULT NULL, + mean REAL DEFAULT NULL, + std_dev REAL DEFAULT NULL, + CONSTRAINT fk_g2dgtat_name FOREIGN KEY (tpudt_name) REFERENCES gpkg_contents(table_name), + UNIQUE (tpudt_name, tpudt_id) +); ---- diff --git a/spec/2d-gridded-coverage/clause_6_informative_text.adoc b/spec/2d-gridded-coverage/clause_6_informative_text.adoc index 3fdf0446..00be71c3 100644 --- a/spec/2d-gridded-coverage/clause_6_informative_text.adoc +++ b/spec/2d-gridded-coverage/clause_6_informative_text.adoc @@ -24,7 +24,7 @@ The definition used in this standard accommodates any reference surface, includi === Storage formats and grid cell values -This extension to the OGC GeoPackage Encoding Standard leverages the existing structure for raster tiles as defined in GeoPackage Clause 2.2 using PNG (16-bit, signed integer) and TIFF (32-bit, float) files as the container for the grid values, such as elevation. The data producer has the responsibility to ensure that the intended recipient is able to read GeoPackages that contain a grid-regular coverage encoding (PNG or TIFF). Please note that using multiple zoom levels for a grid-regular coverage is purely optional. There is no requirement that grid-regular tiles have to be in a full pyramid. Clause 2.2 specifies how each zoom level is encoded. There may be only one zoom level. +This extension to the OGC GeoPackage Encoding Standard leverages the existing structure for raster tiles as defined in GeoPackage Clause 2.2 using PNG (16-bit, unsigned integer) and TIFF (32-bit, float) files as the container for the grid values, such as elevation. The data producer has the responsibility to ensure that the intended recipient is able to read GeoPackages that contain a grid-regular coverage encoding (PNG or TIFF). Please note that using multiple zoom levels for a grid-regular coverage is purely optional. There is no requirement that grid-regular tiles have to be in a full pyramid. Clause 2.2 specifies how each zoom level is encoded. There may be only one zoom level. Clause 7.1.1.2 and Table 1 Ancillary Coverage Data Definition define how the application to specify how the value of a grid cell is assigned. Obviously, if we are dealing with a _continuous_ gridded coverage, values between grid cell center points can be interpolated, such as for contouring.