Skip to content

Commit

Permalink
Core; Subsetting; Coverage Tiles: Clarifications on Area vs. Point & …
Browse files Browse the repository at this point in the history
…Subsetting

- This attempts to provide clarity related to opengeospatial#92 and opengeospatial/coverage-implementation-schema#6
  grounded in the well-defined Dimensionally Extended 9-Intersection Model (DE9-IM).
- It explicitly avoids the ambiguous concepts of "pixel offset" and "center vs. corner" which do not make obvious that the values of a gridded coverage reflect a particular cell geometry.
- The cell geometry of a gridded coverage is most often defined as an infinitely small point (span = 0) or an area whose side is as large as the resolution (span = 1).
  • Loading branch information
jerstlouis committed May 15, 2024
1 parent 74a0eb8 commit df671fe
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 4 deletions.
7 changes: 7 additions & 0 deletions standard/clause_12_coverage_tiles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ The "Coverage Tiles" Requirements Class defines how to combine the _OGC API - Ti
Coverages parameters such as for subsetting additional dimensions not covered by the Tiles 2D Tile Matrix Set (such as time or elevation),
or for range subsetting, can be used together with the path for requesting individual tiles.

The tiles response for a coverage corresponds to a subsetting request for the tile extent.
Note that the number of cells in the response for a _Value-Is-Point_ coverage is one more than the tile pixel size of the TileMatrixSet.

[#span-coverage-tiles,reftext='{figure-caption} {counter:fig-num}']
.The cells returned for a tile response of a gridded coverage for _Value-is-Point_ (span = 0) and _Value-is-Area_ (span = 1)
image::figures/spanCoverageTiles.png[]

=== Coverage Tiles Examples

See also <<coverage-tiles-examples, examples of coverage tile requests>> in an annex.
Expand Down
22 changes: 22 additions & 0 deletions standard/clause_7_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,26 @@ This extent information provides equivalent information to the CIS _domain set_
For point cloud data, a separate detailed description of the domain is not practical, and a subset of the domain is instead retrieved together with the data, as with the common LAS and LASZip point cloud encodings.
In this case, only the overall interval, and optionally detailed sub-intervals where data is available, can be provided instead within the collection extent.

When describing the extent of a coverage, the geometry of the cells must be considered.

[#span-extent,reftext='{figure-caption} {counter:fig-num}']
.The span of a gridded coverage for _Value-is-Point_ (span = 0) and _Value-is-Area_ (span = 1), and a special case of _Value-is-Part-of-the-Area_ (span = 0.5)
image::figures/span.png[width=400,align=center]

The multidimensional extent being described is the extent of the coverage up to the boundary of the geometry of the cells.

[#span,reftext='{figure-caption} {counter:fig-num}']
.Example extent of a gridded coverage for _Value-is-Point_ (span = 0) and _Value-is-Area_ (span = 1)
image::figures/spanExtent.png[]

The reported extent (the CRS84 `bbox` and/or the native CRS `storageCrsBbox` in the spatial extent, and the interval bounds in the temporal and/or any additional dimensions of the extent) must correspond to the envelope of the geometry of all cells.
For cells representing an area, the extent spans from the lower to the upper bounds of the areas of all those cells.
For cells representing a point, the extent spans from the the lower to the upper coordinate of all those cells.

For gridded coverages, considering the lower and upper bound specified in the interval / bounding box as well as the `cellsCount` and `resolution` specified in the `grid` property, the following applies.

If cell values represent an area, `cellsCount = (highBound - lowBound) / resolution`.

If cell values represent a point, `cellsCount = (highBound - lowBound) / resolution + 1`.

include::requirements/requirements_class_core.adoc[]
24 changes: 23 additions & 1 deletion standard/clause_8_subsetting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,32 @@

=== Overview

The "Subsetting" Requirements Class specifies the `subset`, `bbox` and `datetime` parameters for coverage resource, allowing to retrieve only a subset of the coverage along one or more dimensions.
The "Subsetting" Requirements Class specifies the `subset`, `bbox` and `datetime` parameters for the coverage resource, allowing to retrieve only a subset of the coverage along one or more dimensions.
With the `subset` and `datetime` parameters, a subset operation may be a trimming operation (preserving dimensionality) or slicing operation (reducing dimensions), depending on whether a single coordinate or an interval is used.
Negotiating a response in a format with limited multidimensionality support, such as image-based format like GeoTIFF, also implies a reduced dimensionality.

When subsetting a coverage within a lower and upper bound, a trimming operation is performed, and the response will preserve the dimension being subset.
When subsetting a coverage for a single value, a slicing operation is performed, and the response will not contain that dimension being subset.

When subsetting a coverage, the geometry of the cells must be considered.

If the value for the cells of the coverage represent an area, the geometry of the cells extends over that whole area.
If the value for the cells of the coverage represent a point, the geometry of the cells is only that infinitely small point.

The values to include in the response will be all **cells whose geometry's interior** intersects the **interior or the boundary of the subsetting extent**, in line with the https://en.wikipedia.org/wiki/DE-9IM[DE9-IM] model.

For cells whose geometry is a point, this will **include** all cells falling exactly on the boundary of the subset (**the interior of a point is the point itself**).

For cells whose geometry is an area, this will **exclude** the cells boundaries falls exactly on the boundary of the subset (**the interior of an area excludes its boundary**).

[#subset-aligned,reftext='{figure-caption} {counter:fig-num}']
.Responses for a subsetting request aligned to the coverage grid for _Value-is-Point_ (span = 0) vs. _Value-is-Area_ (span = 1)
image::figures/spanSubset.png[]

[#subset-non-aligned,reftext='{figure-caption} {counter:fig-num}']
.Responses for a subsetting request not aligned to the coverage grid for _Value-is-Point_ (span = 0) vs. _Value-is-Area_ (span = 1)
image::figures/spanSubsetNonAligned.png[]

=== Subsetting Examples

See also <<subsetting-examples, examples of subsetting requests>> in an annex.
Expand Down
Binary file added standard/figures/span.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added standard/figures/spanCoverageTiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added standard/figures/spanExtent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added standard/figures/spanLargerMap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added standard/figures/spanMap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added standard/figures/spanSubset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added standard/figures/spanSubsetNonAligned.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added standard/figures/spanTerrainMesh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions standard/requirements/requirements_class_cisjson.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
^|A |The coverage resource, as defined in the Core requirement class, SHALL support negotiating a CIS JSON response using the `application/json` media type.
^|B |The response SHALL be a CIS JSON document which validates against the CIS JSON schema https://github.com/opengeospatial/ogcapi-coverages/blob/master/standard/openapi/schemas/cis/coverage-schema.yaml[coverage-schema.yaml].
^|C |The coverage object response SHALL be of type _CoverageByDomainAndRange_ (not _CoverageByPartitioning_, the implementation can instead consider supporting the "Scenes" requirement class to present individual parts of a coverage).
^|D |For a gridded coverage, the DomainSet SHALL be defined taking into consideration the geometry of the coverage cells, as per the following equation:

**span** = (_RegularAxis_ `upperBound` - _RegularAxis_ `lowerBound`) / _RegularAxis_ `resolution` - (_IndexAxis_ `upperBound` - _IndexAxis_ `lowerBound`)

where a _span_ of 1 indicates a coverage whose cell values represent an _area_, and a _span_ of 0 indicates a coverage whose cell values represent a _point_.
|===

===== Profiling CIS components to include
Expand Down
9 changes: 8 additions & 1 deletion standard/requirements/requirements_class_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
2+|*Requirements Class*
2+|http://www.opengis.net/spec/ogcapi-coverages-1/1.0/req/core
|Target type |Web API
|Dependency |http://www.opengis.net/spec/ogcapi-common-2/1.0/req/collections
|Dependency |http://www.opengis.net/spec/ogcapi-common-2/1.0/req/umd-collection
|Dependency |http://www.opengis.net/spec/ogcapi-common-2/1.0/req/schemas
|===

=== Requirements
Expand All @@ -21,6 +22,9 @@

==== Extended collection description response (`/collections/{collectionId}`)

This "Core" requirement class of OGC API - Coverages depends on the "Uniform Multi-dimension Collection" requirement class defined in _Common - Part 2: Geospatial data_,
in addition to the basic "Collections" requirement class, allowing to describe the domain of the coverage, akin to the CIS DomainSet.

[[req_core-collection_description]]
[width="90%",cols="2,6"]
|===
Expand Down Expand Up @@ -54,6 +58,9 @@ https://schemas.opengis.net/ogcapi/tiles/part1/1.0/openapi/schemas/common-geodat

==== Collection schema response (`/collections/{collectionId}/schema`)

This "Core" requirement class of OGC API - Coverages depends on the "Schemas" requirement class defined in _Common - Part 2: Geospatial data_,
in addition to the basic "Collections" requirement class, allowing to describe the range of the coverage, askin to the CIS RangeType.

[[req_core-coverage_schema]]
[width="90%",cols="2,6"]
|===
Expand Down
8 changes: 6 additions & 2 deletions standard/requirements/requirements_class_coverage_subset.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
[[bbox-parameter]]
==== Parameter `bbox`

The `bbox` parameter defines how to subset a coverage using a bounding box (in `bbox-crs` coordinates).
This parameter selects a spatial region consisting of any cells of the coverage whose cell geometry's interior intersects with the interior or boundary of the specified bounding box .
Individual cells may occupy an area on the ground (the value of the cell represents an area), or an infinitely small point (the value of the cell represents a point).

[[bbox-definition]]
[width="90%",cols="2,6a"]
|===
Expand Down Expand Up @@ -57,7 +61,7 @@ If the vertical axis is included, the third and the sixth number are the bottom
^|C|If the `bbox-crs` is not indicated http://www.opengis.net/def/crs/OGC/1.3/CRS84 SHALL be assumed.
^|D|The native CRS (`storageCrs`) SHALL be supported as a value. Other conformance classes may allow additional values (see `crs` parameter definition).
^|E|The CRS expressed as URIs or as safe CURIEs SHALL be supported.
^|F|If the bbox parameter is not used, the `bbox-crs` SHALL be ignored.
^|F|If the `bbox` parameter is not used, the `bbox-crs` SHALL be ignored.
|===

[[datetime-parameter-subset-requirements]]
Expand Down Expand Up @@ -189,7 +193,7 @@ or simply return the properly geo-referenced values within the domain set.
^|C |If the `subset-crs` is not indicated, http://www.opengis.net/def/crs/OGC/1.3/CRS84 SHALL be assumed.
^|D |The native CRS (`storageCrs`) SHALL be supported as a value. Other requirements classes may allow additional values (see `crs` parameter definition).
^|E |CRSs expressed as URIs or as safe CURIEs SHALL be supported.
^|F |If no `subset` parameter referring to an axis of the CRS is used, the `subset-crs` SHALL be ignored.
^|F |If no `subset` parameter refers to an axis of the CRS value specified for the `subset-crs` parameter, this parameter SHALL be ignored.
|===

==== Permission for Slicing Sparse Dimensions
Expand Down

0 comments on commit df671fe

Please sign in to comment.