diff --git a/21-038.html b/21-038.html index b8485b29..63eaafb9 100644 --- a/21-038.html +++ b/21-038.html @@ -1415,7 +1415,7 @@ @@ -1446,7 +1446,7 @@

I.  Abstract

matching a specified query, in combination with other building blocks defining queries, such as a filter defined using the OGC Common Query Language (CQL2).

-
+

II.  Keywords

The following are keywords to be used by search engines and document catalogues.

@@ -1468,7 +1468,7 @@

III.  Preface

IV.  Security considerations

No security considerations have been made for this document.

-
+

V.  Submitting Organizations

The following organizations submitted this Document to the Open Geospatial Consortium (OGC):

@@ -3125,8 +3125,8 @@

Annex C
(informative)
Examples

C.5.2.  Querying for a spatio-temporal subset

-

To request a list of zones for an area of interest, the bbox or subset query parameter can be used. -For a temporal DGGS, datetime can be used as well as subset=time(…​) to constrain the query to a time of interest. +

To request a list of zones for an area of interest, the bbox or subset query parameter can be used. +For temporal datasets, the datetime can be used as well as subset=time(…​) to constrain the query to a time of interest. For restricting the same zone query to a bounding box area from (40°N, 30°E) to (60°N,50°E), the client could make either of the following requests:

\https://maps.gnosis.earth/ogcapi/collections/gebco/dggs/ISEA3H/zones?bbox=30,40,50,60&zone-level=1&compact-zones=false

@@ -3399,14 +3399,14 @@

Annex C
(informative)
Examples

C.7.  Filtering zone queries using CQL2 expressions

-

The Zone Query capabilities is most useful for use cases where the retrieves zone list is the result of some operation, -whether as a result of a processing workflow or by evaluating a query expressed by the client. +

The Zone Query capabilities is most useful for use cases where the retrieved zone list is the result of some operation, +whether a processing workflow or the evaluation of a query expressed by the client. The CQL2 filter capability allows to express such queries using the OGC Common Query Language (CQL2). Note that the processing workflow could also itself include CQL2 expressions using input/output field modifiers.

The CQL2 requirement class in this standard specifically calls for the CQL2-Text encoding, which is an intuitive representation with many similarities to SQL. CQL2 defines minimum capabilities (Basic CQL2) as well as additional optional capabilities, such as -arithmetic operations and spatial relation functions. +arithmetic operations and spatial relation functions. The API implementation’s conformance resource (/conformance as defined in OGC API — Common — Part 1: Core “Landing Page” requirement class) would allow the client to know which capabilities are supported.

@@ -3420,10 +3420,12 @@

Annex C
(informative)
Examples

The application/schema+json response would look like so:

-
{
   "$schema" : "https://json-schema.org/draft/2020-12/schema",
   "$id" : "https://maps.gnosis.earth/ogcapi/collections/gebco/queryables",
   "title" : "General Bathymetric Chart of the Oceans",
   "type" : "object",
   "properties" : {
      "Elevation" :
      {
         "type" : "number",
         "x-ogc-property-seq" : 1,
         "x-ogc-definition": "https://qudt.org/vocab/quantitykind/Altitude",
         "x-ogc-unit": "m"
      }
   }
}
+
{
   "$schema" : "https://json-schema.org/draft/2020-12/schema",
   "$id" : "https://maps.gnosis.earth/ogcapi/collections/gebco/queryables",
   "title" : "General Bathymetric Chart of the Oceans",
   "type" : "object",
   "properties" : {
      "Elevation" :
      {
         "type" : "number",
         "x-ogc-property-seq" : 1,
         "x-ogc-definition": "https://qudt.org/vocab/quantitykind/Altitude",
         "x-ogc-unit": "m"
      },
      "rec.geom" : {
         "x-ogc-role" : "primary-geometry",
         "format" : "geometry-point"
      }
   }
}
-

This informs the client that a single Elevation queryable is available for use in CQL2 expressions.

+

This informs the client that an Elevation queryable is available for use in CQL2 expressions. +Although this collection is a gridded coverage, a rec.geom queryable is still included in the schema which represents the geometry of each individual grid cell. +Since the value associated with these cells represent a point in this collection, the format indicates geometry-point. Later examples will make use of this rec.geom property.

The client could then submit the following zone query to return only zones where elevation is below sea level (Elevation < 0), at refinement level 6:

@@ -3460,11 +3462,77 @@

Annex C
(informative)
Examples #img_cql2_gebco_Elevation_high_or_deep='Figure 44'

Figure C.35 — GeoJSON compact zones response for querying ISEA3H DGGRS for GEBCO 2014 bathymetry with CQL2 expression Elevation < -4000 or Elevation > 3000 visualized in QGIS

This last visualization higlights the fact that the Andes and Antarctica mountains are actually very close to very deep sea.

+ +

If the implementation support spatial relation functions, a query could test intersection with a geometry, which can be expressed using a WKT literal in CQL2-Text. +The following example returns zones intersecting the Bermuda Triangle, making use of the rec.geom queryable, which represents the geometry of the individual coverage grid cells, mentioned earlier, at refinement level 9.

+ +

https://maps.gnosis.earth/ogcapi/collections/gebco/dggs/isea3h/zones?zone-level=9=S_INTERSECTS(rec.geom,POLYGON-64.8%2032.3,-65.5%2018.3,-80.3%2025.2,-64.8%2032.3)&f=json[“https://maps.gnosis.earth/ogcapi/collections/gebco/dggs/isea3h/zones?zone-level=9&filter=S_INTERSECTS(rec.geom,POLYGON-64.8 32.3,-65.5 18.3,-80.3 25.2,-64.8 32.3)”]

+ +
+ +#img_cql2_gebco_polygon='Figure 45'

Figure C.36 — GeoJSON compact zones response for querying ISEA3H DGGRS for GEBCO 2014 bathymetry with a CQL2 expression using S_INTERSECTS() for a WKT triangular polygon visualized in QGIS

+ +

This spatial filter could also be combined together with a relational operator as in the following query for Elevation < -5500 within the Bermuda Triangle:

+ +

https://maps.gnosis.earth/ogcapi/collections/gebco/dggs/isea3h/zones?zone-level=11=Elevation%20%20-5500%20and%20S_INTERSECTS(rec.geom,POLYGON-64.8%2032.3,-65.5%2018.3,-80.3%2025.2,-64.8%2032.3)&f=json[“https://maps.gnosis.earth/ogcapi/collections/gebco/dggs/isea3h/zones?zone-level=11&filter=Elevation < -5500 and S_INTERSECTS(rec.geom,POLYGON-64.8 32.3,-65.5 18.3,-80.3 25.2,-64.8 32.3)”]

+ +
+ +#img_cql2_gebco_Elevation_polygon='Figure 46'

Figure C.37 — GeoJSON compact zones response for querying ISEA3H DGGRS for GEBCO 2014 bathymetry with a CQL2 expression using both Elevation < -5500 as well as S_INTERSECTS() for a WKT polygon visualized in QGIS

+ +

To illustrate the use of CQL2 arithmetic operators, the following example will use a collection of daily climate CMIP5 data from the Copernicus Climate Data Store. +The request will be for zones where the difference between two different fields of the coverage, the maximum (tasmax) and minimum (tasmin) daily near-surface air temperature, is greater than 10 degrees Kelvin. +In addition, this request will use the datetime parameter to subset the temporal dimension for June 1, 2023.

+ +

\https://maps.gnosis.earth/ogcapi/collections/climate:cmip5:singlePressure/dggs/isea3h/zones?zone-level=7&filter=(tasmax-tasmin)>10&datetime=2023-06-01

+ +
+ +#img_cql2_tas_delta='Figure 47'

Figure C.38 — GeoJSON compact zones response for querying ISEA3H DGGRS for CMIP5 daily surface temperature from Copernicus Climate Data Store comparing delta with CQL2 expression (tasmax - tasmin) > 10 visualized in QGIS

+ +

CQL2 expressions can also be used for queries using attributes of vector features. +The following examples use a collection of building polygon features in Ottawa extracted from the OpenStreetMap dataset, filtering buildings using both a spatial subset and the name attribute of the features.

+ +

This first example illustrates querying for the National Arts Centre at ISEA3H level 30:

+ +

\https://maps.gnosis.earth/ogcapi/collections/osm:ottawa:buildings/dggs/ISEA3H/zones?subset=Lat(45.4198:45.4264),Lon(-75.704:-75.6935)&filter=name=’National Arts Centre’&zone-level=30

+ +
+ +#img_cql2_isea3h_nac='Figure 48'

Figure C.39 — GeoJSON compact zones response for querying ISEA3H DGGRS for Ottawa buildings (© OpenStreetMap contributors) with CQL2 expression name='National Arts Centre' at level 30, visualized in QGIS

+ +

This second example illustrates querying for the East Block at ISEA9R level 15 (corresponding to ISEA3H level 30):

+ +

\https://maps.gnosis.earth/ogcapi/collections/osm:ottawa:buildings/dggs/ISEA9R/zones?subset=Lat(45.4198:45.4264),Lon(-75.704:-75.6935)&filter=name=’East Block’&zone-level=15

+ +
+ +#img_cql2_isea9r_east='Figure 49'

Figure C.40 — GeoJSON compact zones response for querying ISEA9R DGGRS for Ottawa buildings (© OpenStreetMap contributors) with CQL2 expression name='East Block' at level 15, visualized in QGIS

+ +

This third example illustrates querying for the Centre Block at GNOSIS Global Grid level 24 (corresponding approximately to same resolution):

+ +

\https://maps.gnosis.earth/ogcapi/collections/osm:ottawa:buildings/dggs/GNOSISGlobalGrid/zones?subset=Lat(45.4198:45.4264),Lon(-75.704:-75.6935)&filter=name=’Centre Block’&zone-level=24

+ +
+ +#img_cql2_ggg_centre='Figure 50'

Figure C.41 — GeoJSON compact zones response for querying GNOSIS Global Grid DGGRS for Ottawa buildings (© OpenStreetMap contributors) with CQL2 expression name='Centre Block' at level 24, visualized in QGIS

+ +

A future extension could also enable cross-collection queries, possibly using a joinCollections parameter which would make queryables from different collections available.

+

+

C.8.  Retrieving data for a DGGRS Zone

+ +

The following example retrieves elevation data for the GEBCO collection for ISEA3H zone A2-0-A at a relative depth of 8:

+ +

https://maps.gnosis.earth/ogcapi/collections/gebco/dggs/ISEA3H/zones/A2-0-A/data?zone-depth=8

+ +
+ +#img_zone_data='Figure 51'

Figure C.42 — Visualization of a DGGS JSON response for querying ISEA3H DGGRS for zone A2-0-A of GEBCO 2014 bathymetry at a relative depth of 8


-

Annex D
(informative)
Revision History

+

Annex D
(informative)
Revision History

Table D.1

@@ -3565,8 +3633,9 @@

Annex D
(informative)
Revision


-

Bibliography

-

[1]  Robert Thomas, Sara Saeedi: OGC 23-010, Towards a Federated Marine SDI: Connecting Land and Sea to Protect the Arctic Environment Engineering Report. Open Geospatial Consortium (2023). http://www.opengis.net/doc/PER/FMSDI3.

[2]  Robert Gibb, Byron Cochrane, Matthew Purss: OGC 20-039r2, OGC Testbed-16: DGGS and DGGS API Engineering Report. Open Geospatial Consortium (2021). http://www.opengis.net/doc/PER/t16-D017.

[3]  Jérôme Jacovella-St-Louis, Flexible real-time data processing and visualization workflows emerging from OGC API modules (Draft), OGC 21-033 (2021). https://maps.ecere.com/moaw/DiscussionPaper-Draft3.pdf

[4]  Universal Binary JSON Specification. https://ubjson.org/

[5]  Snyder, J. P., An Equal-Area Map Projection for Polyhedral Globes, Cartographica, 29(1),10-21. urn:doi:10.3138/27H7-8K88-4882-1752 (1992). https://doi.org/10.3138/27H7-8K88-4882-1752

[6]  Kevin Sahr, Denis White, A. Jon Kimerling, Geodesic Discrete Global Grid Systems, Cartography and Geographic Information Science, Vol. 30, No. 2, pp. 121-134 (2003). https://cs.sou.edu/~sahrk/dgg/pubs/gdggs03.pdf

[7]  Robert Gibb, The rHEALPix Discrete Global Grid System. IOP Conference Series: Earth and Environmental Science. 34. 012012. 10.1088/1755-1315/34/1/012012 (2016). https://dx.doi.org/10.1088/1755-1315/34/1/012012

+

Bibliography

+

[1]  Robert Thomas, Sara Saeedi: OGC 23-010, Towards a Federated Marine SDI: Connecting Land and Sea to Protect the Arctic Environment Engineering Report. Open Geospatial Consortium (2023). http://www.opengis.net/doc/PER/FMSDI3.

[2]  Robert Gibb, Byron Cochrane, Matthew Purss: OGC 20-039r2, OGC Testbed-16: DGGS and DGGS API Engineering Report. Open Geospatial Consortium (2021). http://www.opengis.net/doc/PER/t16-D017.

[3]  Jérôme Jacovella-St-Louis, Flexible real-time data processing and visualization workflows emerging from OGC API modules (Draft), OGC 21-033 (2021). https://maps.ecere.com/moaw/DiscussionPaper-Draft3.pdf

[4]  Universal Binary JSON Specification. https://ubjson.org/

[5]  Michael F. Goodchild, Yang Shiren, A hierarchical spatial data structure for global geographic information systems, CVGIP: Graphical Models and Image Processing, Volume 54, Issue 1, Pages 31-44, ISSN 1049-9652 (1992). https://doi.org/10.1016/1049-9652(92)90032-S

[6]  John P. Snyder, An Equal-Area Map Projection for Polyhedral Globes, Cartographica, 29(1),10-21. urn:doi:10.3138/27H7-8K88-4882-1752 (1992). https://doi.org/10.3138/27H7-8K88-4882-1752

[7]  Kevin Sahr, Denis White, A. Jon Kimerling, Geodesic Discrete Global Grid Systems, Cartography and Geographic Information Science, Vol. 30, No. 2, pp. 121-134 (2003). https://cs.sou.edu/~sahrk/dgg/pubs/gdggs03.pdf

[8]  Robert Gibb, The rHEALPix Discrete Global Grid System. IOP Conference Series: Earth and Environmental Science. 34. 012012. 10.1088/1755-1315/34/1/012012 (2016). https://dx.doi.org/10.1088/1755-1315/34/1/012012

+ diff --git a/21-038.pdf b/21-038.pdf index 2934933b..4556e804 100644 Binary files a/21-038.pdf and b/21-038.pdf differ