Skip to content

Commit

Permalink
Core; schema: Changes to use storageCrsBbox
Browse files Browse the repository at this point in the history
- inside extent.spatial instead of top-level `storageCrsExtent`
- This addresses the issue raised by Tom for coverages in a native CRS other than CRS84
  at the code sprint in Evora, bringing this native CRS bounding box right next to the grid definition.
- Changes to rely on 'definition' rather than 'crs' for non-spatial dimension
  • Loading branch information
jerstlouis committed Apr 10, 2024
1 parent 9f42c18 commit 43d7958
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 14 deletions.
46 changes: 44 additions & 2 deletions standard/openapi/ogcapi-coverages-1.bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -948,11 +948,39 @@
"type": "object",
"properties": {
"bbox": {
"description": "One or more bounding boxes that describe the spatial extent of the dataset.\nIn the Core only a single bounding box is supported.\n\nExtensions may support additional areas.\nThe first bounding box describes the overall spatial\nextent of the data. All subsequent bounding boxes describe\nmore precise bounding boxes, e.g., to identify clusters of data.\nClients only interested in the overall spatial extent will\nonly need to access the first item in each array.",
"description": "One or more bounding boxes that describe the spatial extent of the dataset.\n\nThe first bounding box describes the overall spatial\nextent of the data. All subsequent bounding boxes describe\nmore precise bounding boxes, e.g., to identify clusters of data.\nClients only interested in the overall spatial extent will\nonly need to access the first item in each array.",
"type": "array",
"minItems": 1,
"items": {
"description": "Each bounding box is provided as four or six numbers, depending on\nwhether the coordinate reference system includes a vertical axis\n(height or depth):\n\n* Lower left corner, coordinate axis 1\n* Lower left corner, coordinate axis 2\n* Minimum value, coordinate axis 3 (optional)\n* Upper right corner, coordinate axis 1\n* Upper right corner, coordinate axis 2\n* Maximum value, coordinate axis 3 (optional)\n\nIf the value consists of four numbers, the coordinate reference system is\nWGS 84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84)\nunless a different coordinate reference system is specified in a parameter `bbox-crs`.\n\nIf the value consists of six numbers, the coordinate reference system is WGS 84\nlongitude/latitude/ellipsoidal height (http://www.opengis.net/def/crs/OGC/0/CRS84h)\nunless a different coordinate reference system is specified in a parameter `bbox-crs`.\n\nFor WGS 84 longitude/latitude the values are in most cases the sequence of\nminimum longitude, minimum latitude, maximum longitude and maximum latitude.\nHowever, in cases where the box spans the antimeridian the first value\n(west-most box edge) is larger than the third value (east-most box edge).\n\nIf the vertical axis is included, the third and the sixth number are\nthe bottom and the top of the 3-dimensional bounding box.\n\nIf a feature has multiple spatial geometry properties, it is the decision of the\nserver whether only a single spatial geometry property is used to determine\nthe extent or all relevant geometries.",
"description": "Each bounding box is provided as four or six numbers, depending on\nwhether the coordinate reference system includes a vertical axis\n(height or depth):\n\n* Lower left corner, coordinate axis 1\n* Lower left corner, coordinate axis 2\n* Minimum value, coordinate axis 3 (optional)\n* Upper right corner, coordinate axis 1\n* Upper right corner, coordinate axis 2\n* Maximum value, coordinate axis 3 (optional)\n\nIf the value consists of four numbers, the coordinate reference system is\nWGS 84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84)\nunless a different coordinate reference system is specified in `crs` property.\n\nIf the value consists of six numbers, the coordinate reference system is WGS 84\nlongitude/latitude/ellipsoidal height (http://www.opengis.net/def/crs/OGC/0/CRS84h)\nunless a different coordinate reference system is specified in `crs` property.\n\nFor WGS 84 longitude/latitude the values are in most cases the sequence of\nminimum longitude, minimum latitude, maximum longitude and maximum latitude.\nHowever, in cases where the box spans the antimeridian the first value\n(west-most box edge) is larger than the third value (east-most box edge).\n\nIf the vertical axis is included, the third and the sixth number are\nthe bottom and the top of the 3-dimensional bounding box.\n\nIf a feature has multiple spatial geometry properties, it is the decision of the\nserver whether only a single spatial geometry property is used to determine\nthe extent or all relevant geometries.",
"type": "array",
"oneOf": [
{
"minItems": 4,
"maxItems": 4
},
{
"minItems": 6,
"maxItems": 6
}
],
"items": {
"type": "number"
},
"example": [
-180,
-90,
180,
90
]
}
},
"storageCrsBbox": {
"description": "One or more bounding boxes that describe the spatial extent of the dataset in the storage (native) CRS (`storageCrs` property).\n\nThe first bounding box describes the overall spatial\nextent of the data. All subsequent bounding boxes describe\nmore precise bounding boxes, e.g., to identify clusters of data.\nClients only interested in the overall spatial extent will\nonly need to access the first item in each array.",
"type": "array",
"minItems": 1,
"items": {
"description": "Each bounding box is provided as four or six numbers, depending on\nwhether the coordinate reference system includes a vertical axis\n(height or depth):\n\n* Lower left corner, coordinate axis 1\n* Lower left corner, coordinate axis 2\n* Minimum value, coordinate axis 3 (optional)\n* Upper right corner, coordinate axis 1\n* Upper right corner, coordinate axis 2\n* Maximum value, coordinate axis 3 (optional)",
"type": "array",
"oneOf": [
{
Expand Down Expand Up @@ -1233,6 +1261,20 @@
]
}
}
},
"definition": {
"type": "string",
"format": "uri",
"description": "A URI to the definition of the measured or observed property corresponding to this dimension."
},
"unit": {
"type": "string",
"description": "The unit of measure in which the interval and/or grid values are expressed."
},
"unitLang": {
"type": "string",
"default": "UCUM",
"description": "The language (or vocabulary) in which the unit is expressed (defaults to \"UCUM\" if not specified)."
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions standard/openapi/schemas/common-geodata/extent-uad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,14 @@ allOf:
example:
- "PT1H"
- 0.0006866455078
definition:
type: string
format: uri
description: A URI to the definition of the measured or observed property corresponding to this dimension.
unit:
type: string
description: The unit of measure in which the interval and/or grid values are expressed.
unitLang:
type: string
default: UCUM
description: The language (or vocabulary) in which the unit is expressed (defaults to "UCUM" if not specified).
42 changes: 38 additions & 4 deletions standard/openapi/schemas/common-geodata/extent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ properties:
bbox:
description: |-
One or more bounding boxes that describe the spatial extent of the dataset.
In the Core only a single bounding box is supported.
Extensions may support additional areas.
The first bounding box describes the overall spatial
extent of the data. All subsequent bounding boxes describe
more precise bounding boxes, e.g., to identify clusters of data.
Expand All @@ -42,11 +40,11 @@ properties:
If the value consists of four numbers, the coordinate reference system is
WGS 84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84)
unless a different coordinate reference system is specified in a parameter `bbox-crs`.
unless a different coordinate reference system is specified in `crs` property.
If the value consists of six numbers, the coordinate reference system is WGS 84
longitude/latitude/ellipsoidal height (http://www.opengis.net/def/crs/OGC/0/CRS84h)
unless a different coordinate reference system is specified in a parameter `bbox-crs`.
unless a different coordinate reference system is specified in `crs` property.
For WGS 84 longitude/latitude the values are in most cases the sequence of
minimum longitude, minimum latitude, maximum longitude and maximum latitude.
Expand All @@ -72,6 +70,42 @@ properties:
- -90
- 180
- 90
storageCrsBbox:
description: |-
One or more bounding boxes that describe the spatial extent of the dataset in the storage (native) CRS (`storageCrs` property).
The first bounding box describes the overall spatial
extent of the data. All subsequent bounding boxes describe
more precise bounding boxes, e.g., to identify clusters of data.
Clients only interested in the overall spatial extent will
only need to access the first item in each array.
type: array
minItems: 1
items:
description: |-
Each bounding box is provided as four or six numbers, depending on
whether the coordinate reference system includes a vertical axis
(height or depth):
* Lower left corner, coordinate axis 1
* Lower left corner, coordinate axis 2
* Minimum value, coordinate axis 3 (optional)
* Upper right corner, coordinate axis 1
* Upper right corner, coordinate axis 2
* Maximum value, coordinate axis 3 (optional)
type: array
oneOf:
- minItems: 4
maxItems: 4
- minItems: 6
maxItems: 6
items:
type: number
example:
- -180
- -90
- 180
- 90
crs:
description: |-
Coordinate reference system of the coordinates in the spatial extent
Expand Down
18 changes: 10 additions & 8 deletions standard/requirements/requirements_class_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@
This implies using an `interval` array property to describe the overall envelope and optionally sub-intervals for sparsely populated data.
The first element of the array is the overall envelope, while any additional elements detail where data is available within that overall interval.
Each of these elements are themselves an array of start and end bound values.
^|D |Each additional dimension SHALL include in a `crs`, `vrs`, or `trs` property a URI or safe CURIE corresponding to the CRS associated with that dimension.
^|E |The name (JSON dictionary key) of each additional dimension SHALL correspond to the axis abbreviation for the CRS of that axis, to valid axis names for use with query parameters defined in optional requirements classes such as `subset` and `scale-axes`, as well as to axis names in the coverage response, if applicable.
^|F |If a particular dimension of the coverage is gridded, the description of that dimension in the extent SHALL describe this grid using the `grid` property, providing a `cellsCount`, as well as a `resolution` for regular grid or a set of `coordinates` for irregular grids.
^|G |For data referenced in relation to planet Earth, the coordinates in the `bbox` of the `spatial` dimensions of the `extent` SHALL be provided either as WGS 84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84[http://www.opengis.net/def/crs/OGC/1.3/CRS84]) or as WGS 84 longitude/latitude/ellipsoidal height (http://www.opengis.net/def/crs/OGC/0/CRS84h[http://www.opengis.net/def/crs/OGC/0/CRS84h]).
^|H |The `storageCrs` property SHALL be set to the native CRS of the coverage, also corresponding to the default output CRS (used when the `crs` parameter is not specified and/or the CRS requirements class is not supported).
^|I |The `crs` property in the collection object of a geospatial collection SHALL contain URIs or safe CURIEs for the list of CRSs supported by the server for that collection.
^|J |If the collection is available more efficiently (e.g., if it is stored in the server in that CRS) using a particular CRS (the native CRS, also _called storage CRS_) that is not http://www.opengis.net/def/crs/OGC/1.3/CRS84, a `storageCrs` property in the collection object of a geospatial collection SHALL be the URI or the safe CURIE for that CRS.
^|K |If a `storageCrs` property is used and that is not http://www.opengis.net/def/crs/OGC/1.3/CRS84, an extent SHALL be provided in a `storageCrsExtent` property following the same schema as the extent property.
^|D |Any additional temporal dimension SHALL include in a `trs` property a URI or safe CURIE corresponding to the temporal reference system associated with that dimension.
^|E |For additional dimensions which are neither temporal nor spatial, the dimension SHALL include a `definition` property corresonding to a URI for the observed or measured property.
^|F |If applicable, units SHALL be specified in a `unit` property specifying the unit and an (optional) `unitLang` property specifying the language (defaulting to UCUM).
^|G |The name (JSON dictionary key) of each additional dimension SHALL correspond to the axis abbreviation for the CRS of that axis, to valid axis names for use with query parameters defined in optional requirements classes such as `subset` and `scale-axes`, as well as to axis names in the coverage response, if applicable.
^|H |If a particular dimension of the coverage is gridded, the description of that dimension in the extent SHALL describe this grid using the `grid` property, providing a `cellsCount`, as well as a `resolution` for regular grid or a set of `coordinates` for irregular grids.
^|I |For data referenced in relation to planet Earth, the coordinates in the `bbox` of the `spatial` dimensions of the `extent` SHALL be provided either as WGS 84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84[http://www.opengis.net/def/crs/OGC/1.3/CRS84]) or as WGS 84 longitude/latitude/ellipsoidal height (http://www.opengis.net/def/crs/OGC/0/CRS84h[http://www.opengis.net/def/crs/OGC/0/CRS84h]).
^|J |The `storageCrs` property SHALL be set to the native CRS of the coverage, also corresponding to the default output CRS (used when the `crs` parameter is not specified and/or the CRS requirements class is not supported).
^|K |The `crs` property in the collection object of a geospatial collection SHALL contain URIs or safe CURIEs for the list of CRSs supported by the server for that collection.
^|L |If the collection is available more efficiently (e.g., if it is stored in the server in that CRS) using a particular CRS (the native CRS, also _called storage CRS_) that is not http://www.opengis.net/def/crs/OGC/1.3/CRS84, a `storageCrs` property in the collection object of a geospatial collection SHALL be the URI or the safe CURIE for that CRS.
^|M |If a `storageCrs` property is used and that is not https://www.opengis.net/def/crs/OGC/1.3/CRS84, an overall bounding box (and optional inner bounding boxes for sparse data) SHALL be provided in a `storageCrsBbox` property within the `spatial` dimension of the `extent` following the same schema as the CRS84 `bbox`.
|===

NOTE: A CURIE `{authority}[-{objectType}]:{id}` would map to the following OGC URI: `http://www.opengis.net/def/{objectType}/{authority}/0/{id}`. If `-{objectType}` is missing, the default object type is _crs_.
Expand Down

0 comments on commit 43d7958

Please sign in to comment.