Skip to content

Commit

Permalink
Merge pull request #575 from jyutzler/i557
Browse files Browse the repository at this point in the history
corrigenda
  • Loading branch information
jyutzler authored Jan 25, 2021
2 parents 04b1a26 + 5ec3573 commit ef72720
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 66 deletions.
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST001.adoc
Original file line number Diff line number Diff line change
@@ -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)`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST002.adoc
Original file line number Diff line number Diff line change
@@ -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)`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST003.adoc
Original file line number Diff line number Diff line change
@@ -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_)`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST004.adoc
Original file line number Diff line number Diff line change
@@ -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_;`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST005.adoc
Original file line number Diff line number Diff line change
@@ -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_;`
Expand Down
4 changes: 2 additions & 2 deletions spec/2d-gridded-coverage/abstract_tests/TEST006.adoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST007.adoc
Original file line number Diff line number Diff line change
@@ -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_;`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST008.adoc
Original file line number Diff line number Diff line change
@@ -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_;`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST009.adoc
Original file line number Diff line number Diff line change
@@ -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_);`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST010.adoc
Original file line number Diff line number Diff line change
@@ -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_;`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST011.adoc
Original file line number Diff line number Diff line change
@@ -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;`
Expand Down
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/abstract_tests/TEST012.adoc
Original file line number Diff line number Diff line change
@@ -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_;`
Expand Down
78 changes: 26 additions & 52 deletions spec/2d-gridded-coverage/annex-c.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
);
----


Expand All @@ -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)
);
----
2 changes: 1 addition & 1 deletion spec/2d-gridded-coverage/clause_6_informative_text.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit ef72720

Please sign in to comment.