Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add constraints for temporal, spatial and vertical extent. #32

Merged
merged 10 commits into from
Dec 19, 2024
10 changes: 5 additions & 5 deletions profiles/observations/examples/collections-e-soh.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"links": [
{
"href": "https://api.esoh.met.no/collections",
"href": "https://example.org/api/collections",
"rel": "self"
}
],
Expand All @@ -10,7 +10,7 @@
"id": "observations",
"links": [
{
"href": "https://api.esoh.met.no/collections/observations",
"href": "https://example.org/api/collections/observations",
"rel": "data"
}
],
Expand Down Expand Up @@ -42,7 +42,7 @@
"data_queries": {
"position": {
"link": {
"href": "https://api.esoh.met.no/collections/observations/position",
"href": "https://example.org/api/collections/observations/position",
"rel": "data",
"variables": {
"query_type": "position",
Expand All @@ -54,7 +54,7 @@
},
"area": {
"link": {
"href": "https://api.esoh.met.no/collections/observations/area",
"href": "https://example.org/api/collections/observations/area",
"rel": "data",
"variables": {
"query_type": "area",
Expand All @@ -66,7 +66,7 @@
},
"locations": {
"link": {
"href": "https://api.esoh.met.no/collections/observations/locations",
"href": "https://example.org/api/collections/observations/locations",
"rel": "data",
"variables": {
"query_type": "locations",
Expand Down
37 changes: 16 additions & 21 deletions profiles/observations/observations.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,35 @@ Annotated example of a landinpage response that complies with the profile

```json
{
"title": "E-SOH EDR API",
"description": "The E-SOH EDR API",
"title": "Example observations API",
"description": "Example observations API",
"links": [
{
"href": "https://api.esoh.met.no/",
"href": "https://example.org/api/",
"rel": "self",
"type": "application/json",
"title": "Landing Page in JSON"
},
{
"href": "https://api.esoh.met.no/docs",
"href": "https://example.org/api/docs",
"rel": "service-doc",
"type": "text/html",
"title": "API description in HTML"
},
// Landingpage SHALL have a link to openapi describing the service.
// Note: Each "service" pr. openapi? MIME type for openapi.
{
"href": "https://api.esoh.met.no/openapi.json",
"href": "https://example.org/api/openapi.json",
"rel": "service-desc",
"type": "application/json",
"type": "application/vnd.oai.openapi+json;version=3.1",
"title": "API description in JSON"
},

// Conformance response SHALL have uri to RODEO profile.
// Note: Add an conformance response example with this rule.
{
"href": "https://api.esoh.met.no/conformance",
"href": "https://example.org/api/conformance",
"rel": "conformance",
"type": "application/json",
"title": "Conformance Declaration in JSON"
},
{
"href": "https://api.esoh.met.no/collections",
"href": "https://example.org/api/collections",
"rel": "data",
"title": "Collections metadata in JSON"
}
Expand All @@ -56,11 +51,11 @@ Annotated example of a landinpage response that complies with the profile
"radiation"
],
"provider": {
"name": "RODEO",
"url": "https://rodeo-project.eu/"
"name": "EUMETNET",
"url": "https://eumetnet.eu/"
},
"contact": {
"email": "[email protected]"
"email": "[email protected]"
}
}
```
Expand All @@ -73,7 +68,7 @@ Annotated example of a collection that complies with the profile
{
"links": [
{
"href": "https://api.esoh.met.no/collections",
"href": "https://example.org/api/collections",
"rel": "self"
}
],
Expand All @@ -83,7 +78,7 @@ Annotated example of a collection that complies with the profile
"title": "Surface observations from Europe",
"links": [
{
"href": "https://api.esoh.met.no/collections/observations",
"href": "https://example.org/api/collections/observations",
"rel": "data"
},
{
Expand Down Expand Up @@ -121,7 +116,7 @@ Annotated example of a collection that complies with the profile
"data_queries": {
"position": {
"link": {
"href": "https://api.esoh.met.no/collections/observations/position",
"href": "https://example.org/api/collections/observations/position",
"rel": "data",
"variables": {
"query_type": "position",
Expand All @@ -133,7 +128,7 @@ Annotated example of a collection that complies with the profile
},
"area": {
"link": {
"href": "https://api.esoh.met.no/collections/observations/area",
"href": "https://example.org/api/collections/observations/area",
"rel": "data",
"variables": {
"query_type": "area",
Expand All @@ -145,7 +140,7 @@ Annotated example of a collection that complies with the profile
},
"locations": {
"link": {
"href": "https://api.esoh.met.no/collections/observations/locations",
"href": "https://example.org/api/collections/observations/locations",
"rel": "data",
"variables": {
"query_type": "locations",
Expand Down
14 changes: 13 additions & 1 deletion standard/abstract_tests/ATS_class_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,16 @@ include::./core/ATS_test_collection_title.adoc[]

==== Collection license

include::./core/ATS_test_collection_license.adoc[]
include::./core/ATS_test_collection_license.adoc[]

==== Collection spatial extent

include::./core/ATS_test_collection_spatial_extent.adoc[]

==== Collection temporal extent

include::./core/ATS_test_collection_temporal_extent.adoc[]

==== CoverageJSON referencing

include::./core/ATS_test_coveragejson_referencing.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[[ats_core_collection_spatial_extent]]
====
[%metadata]
label:: /conf/core/collection_spatial_extent
subject:: /req/core/collection_spatial_extent
test-purpose:: Validate that a RODEO EDR Profile API provides spatial extent in the correct crs.

[.component,class=test method]
=====

[.component,class=step]
--
Issue an HTTP GET request to path `/collections`.
--

[.component,class=step]
--
Check that the value of the returned HTTP status header is 200.
--

[.component,class=step]
--
In the response document, for each object in the `collections` array, check that the `extent.spatial.crs` property is set to `OGC:CRS84`.
--

[.component,class=step]
--
In the `collections` array, check that the `crs` property is set to `OGC:CRS84` for each object.
--

[.component,class=step]
--
For each object in `collections` array, for each object in the `data_queries` array, if `crs_details` is specified, check that one of the objects in the `crs_details` array has a `crs` property set to `OGC:CRS84`.
--

=====

====
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[[ats_core_collection_temporal_extent]]
====
[%metadata]
label:: /conf/core/collection_temporal_extent
subject:: /req/core/collection_temporal_extent
test-purpose:: Validate that a RODEO EDR Profile API provides temporal extent in the correct trs.

[.component,class=test method]
=====

[.component,class=step]
--
Issue an HTTP GET request to path `/collections`.
--

[.component,class=step]
--
Check that the value of the returned HTTP status header is 200.
--

[.component,class=step]
--
In the response document, for each object in the `collections` array, check that the `extent.temporal.trs` property is set to `Gregorian`.
--

=====

====
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[[ats_core_coveragejson_referencing]]
====
[%metadata]
label:: /conf/core/coveragejson_referencing
subject:: /req/core/coveragejson_referencing
test-purpose:: Validate that a RODEO EDR Profile API provides temporal extent in the correct trs.

[.component,class=test method]
=====

[.component,class=step]
--
Issue an HTTP GET request to path `/collections`.
--

[.component,class=step]
--
Check that the value of the returned HTTP status header is 200.
--

[.component,class=step]
--
For each object in the `collections` array, for each object in `data_queries`, issue a GET request with no crs query parameter specified.
--

[.component,class=step]
--
Check that the response is a CoverageJSON document where each object of `type` `Coverage` contains a `domain.referencing` array which includes an object where `system.type` is set to `GeographicCRS` and `system.id` set to `OGC:CRS84`.
--

[.component,class=step]
--
For each object in the `collections` array, for each object in `data_queries`, issue a GET request for each `crs_details` object where `crs` query parameter set to the value in the `crs_details` object.
--

[.component,class=step]
--
Check that the response is a CoverageJSON object where `domain.referencing` includes an object where `system.type` is set to `GeographicCRS` and `system.id` is equal to the crs query parameter.
--

=====

====
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[rec_core_collection_vertical_extent]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/rec/core/collection_vertical_extent*
^|A |If `extent.vertical` is defined, the value of `extent.vertical.vrs` SHOULD be one the following values: `Pressure level in hPa`, `Geopotential height in gpm`, `Geometrical altitude above mean sea level in meters`, `Height above ground in meters`, `Flight level`.
|===
9 changes: 9 additions & 0 deletions standard/requirements/core/REQ_collection_spatial_extent.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[req_core_collection_spatial_extent]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/core/collection_spatial_extent*
^|A |The value of `extent.spatial.crs` SHALL be `OGC:CRS84`.
^|B |The value of `crs` SHALL include the element `OGC:CRS84`.
^|C |If `crs_details` is specified for a `data_queries` object, the `crs_details` array SHALL include an object whose `crs` value is `OGC:CRS84`.
^|D |If a collection supports more CRSs than `OGC:CRS84`, these values SHOULD be presented on the syntax `EPSG:<code>` in `crs` and `data_queries.*.crs_details.crs` if an epsg code is available.
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[req_core_collection_temporal_extent]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/core/collection_temporal_extent*
^|A |The value of `extent.temporal.trs` SHALL be `Gregorian`.
|===
7 changes: 7 additions & 0 deletions standard/requirements/core/REQ_coveragejson_referencing.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[req_core_coveragejson_referencing]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/core/coveragejson_referencing*
^|A |When requesting data and crs query param is not specified the `system` property for the spatial coordinates in `domain.referencing.*` SHALL have the following values: `"type": "GeographicCRS"` and `"id": "OGC:CRS84"`.
^|B |When requesting data and the crs query param is specified, the `domain.referencing.*.system` object with `"type": "GeographicCRS"` SHALL have its `id` property set to the same value as the crs query param.
|===
27 changes: 26 additions & 1 deletion standard/sections/clause_7_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,29 @@ include::../requirements/core/REQ_collection_title.adoc[]

A license describes the usage permissions for the data in a collection.

include::../requirements/core/REQ_collection_license.adoc[]
include::../requirements/core/REQ_collection_license.adoc[]


=== Collection temporal extent

Temporal extent of a collction

include::../requirements/core/REQ_collection_temporal_extent.adoc[]

=== Collection spatial extent

Spatial extent of a collction

include::../requirements/core/REQ_collection_spatial_extent.adoc[]

=== CoverageJSON referencing

CoverageJSON coordinate system metadata

include::../requirements/core/REQ_coveragejson_referencing.adoc[]

=== Collection vertical extent

Vertical extent of a collection

include::../recommendations/core/REC_collection_vertical_extent.adoc[]