Skip to content

Commit

Permalink
Update extent object based on the discussion in #168
Browse files Browse the repository at this point in the history
Resolves #168

The text in Core does not have examples for the more complete cases that extensions may use. This would be how an example from the discussion in the issue would be represented:

```
{
  "extent":{
    "spatial": {
      "bbox": [[180, -56, -180, 83]],
      "crs":"http://www.opengis.net/def/crs/OGC/1.3/CRS84"
    },
    "temporal":{
      "interval": [["2015-06-23T00:00:00Z", "2015-06-24T00:00:00Z"], ["2015-06-23T00:00:00Z", "2015-06-24T00:00:00Z"]],
      "trs": "http://www.opengis.net/def/uom/ISO-8601/0/Gregorian"
    },
    "thermal":{
      "range": [0, 273.15],
      "uom": "http://www.opengis.net/def/uom/SI/kelvin"
    }
  }
}
```
  • Loading branch information
cportele committed Apr 11, 2019
1 parent 1762e88 commit c47c304
Show file tree
Hide file tree
Showing 8 changed files with 393 additions and 99 deletions.
87 changes: 87 additions & 0 deletions core/openapi/schemas/extent.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,90 @@
description: >-
The extent of the features in the collection. In the Core only spatial and temporal
extents are specified. Extensions may add additional members to represent other
extents, for example, thermal or pressure ranges.
type: object
properties:
spatial:
description: >-
The spatial extent of the features in the collection.
type: object
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. If multiple areas are provided, the union of the bounding
boxes describes the spatial extent.
type: array
minItems: 1
items:
description: >-
West, south, east, north edges of the bounding box. The coordinates
are in the coordinate reference system specified in `crs`. By default
this is WGS84 longitude/latitude.
type: array
minItems: 4
maxItems: 6
items:
type: number
example:
- -180
- -90
- 180
- 90
crs:
description: >-
Coordinate reference system of the coordinates in the spatial extent
(property `bbox`). The default reference system is WGS84 longitude/latitude.
In the Core this is the only supported coordinate reference system.
Extensions may support additional coordinate reference systems and add
additional enum values.
type: string
enum:
- 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
default: 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
temporal:
description: >-
The temporal extent of the features in the collection.
type: object
properties:
bbox:
description: >-
One or more time intervals that describe the temporal extent of the dataset.
In the Core only a single time interval is supported. Extensions may support
multiple intervals. If multiple intervals are provided, the union of the
intervals describes the temporal extent.
type: array
minItems: 1
items:
description: >-
Begin and end times of the time interval. The timestamps
are in the coordinate reference system specified in `trs`. By default
this is the Gregorian calendar.
type: array
minItems: 2
maxItems: 2
items:
type: string
format: date-time
example:
- '2011-11-11T12:22:11Z'
- '2012-11-24T12:32:43Z'
trs:
description: >-
Coordinate reference system of the coordinates in the temporal extent
(property `interval`). The default reference system is the Gregorian calendar.
In the Core this is the only supported temporal reference system.
Extensions may support additional temporal reference systems and add
additional enum values.
type: string
enum:
- 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian'
default: 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian'

TODO
DELETE:

type: object
properties:
crs:
Expand Down
14 changes: 7 additions & 7 deletions core/standard/annex_ats.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The WFS 3.0 standard does not mandate a standard format for the API Description

==== A.2.3 Resource Encodings

The WFS 3.0 standard does not mandate a standard encoding for resources returned by the API. Yet a compliance test requires some minimal level of expected behavior. Therefore, this Abstract Test Suite asserts that the API returns resources encoded in HTML and GeoJSON. Since no compliance test suite exists for these encodings at this time, the resources shall be presented to the test operator for human inspection.
The WFS 3.0 standard does not mandate a standard encoding for resources returned by the API. Yet a compliance test requires some minimal level of expected behavior. Therefore, this Abstract Test Suite asserts that the API returns resources encoded in HTML and GeoJSON. Since no compliance test suite exists for these encodings at this time, the resources shall be presented to the test operator for human inspection.

==== A.2.4 Processing Security Objects

Expand Down Expand Up @@ -143,7 +143,7 @@ For each feature collection in this distribution of the dataset, the links prope
All links SHALL include the rel and type properties. +
Tests: A.4.4.6 +
| *Requirement 14:* Feature Collections Metadata Extent +
For each feature collection, the extent property, if provided, SHALL be a bounding box that includes all spatial and temporal geometries in this collection. +
For each feature collection, the extent property, if provided, SHALL provide bounding boxes that include all spatial geometries and time intervals that include all temporal geometries in this collection. +
If a feature has multiple properties with spatial or temporal information, it is the decision of the server whether only a single spatial or temporal geometry property is used to determine the extent or all relevant geometries. +
Tests: A.4.4.6 +
| *Requirement 15:* Feature Collection Metadta Operation +
Expand Down Expand Up @@ -250,7 +250,7 @@ none

====== c) Test Method:

. All compliance tests shall be configured to use the HTTP 1.1 protocol exclusively.
. All compliance tests shall be configured to use the HTTP 1.1 protocol exclusively.

====== d) References:
Requirement 7
Expand Down Expand Up @@ -462,17 +462,17 @@ None
===== A.4.4.1 Validate /api path

====== a) Test Purpose:
Validate API definition provided through the /api path it the athoritative definition of this API. Validate that this resource exists at the expected location and that it complies with the appropirate schema.
Validate API definition provided through the /api path it the athoritative definition of this API. Validate that this resource exists at the expected location and that it complies with the appropirate schema.

====== b) Pre-conditions:
* A URL to the server hosting the API definition document is known

====== c) Test Method:

. Issue an HTTP GET request to the URL {server}/api

. Validate that a document was returned with a status code of 200

. Validate the returned document against the OpenAPI 3.0 schema

====== d) References:
Expand Down Expand Up @@ -802,7 +802,7 @@ Validate the Get Feature Operation Response.
- To the Feature Collection which contains this Feature

- Alternate encodings of this document in every other media type as identified by the compliance classes for this server.

. Validate that all links include the rel and type link parameters.

====== d) References:
Expand Down
123 changes: 116 additions & 7 deletions core/standard/clause_7_core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ in OpenAPI 3.0?

include::requirements/core/REQ_fc-md-extent.adoc[]

include::requirements/core/REC_fc-md-extent-single.adoc[]

include::requirements/core/PER_fc-md-extent-extensions.adoc[]

.link:https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/schemas/collectionInfo.yaml[Schema for the metadata about a feature collection]
[source,YAML]
----
Expand All @@ -409,9 +413,109 @@ properties:
links:
type: array
items:
$ref: https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/schemas/link.yaml
type: object
required:
- href
properties:
href:
type: string
example: http://data.example.com/buildings/123
rel:
type: string
example: alternate
type:
type: string
example: application/geo+json
hreflang:
type: string
example: en
title:
type: string
example: Trierer Strasse 70, 53115 Bonn
extent:
$ref: https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/schemas/extent.yaml
description: >-
The extent of the features in the collection. In the Core only spatial and temporal
extents are specified. Extensions may add additional members to represent other
extents, for example, thermal or pressure ranges.
type: object
properties:
spatial:
description: >-
The spatial extent of the features in the collection.
type: object
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. If multiple areas are provided, the union of the bounding
boxes describes the spatial extent.
type: array
minItems: 1
items:
description: >-
West, south, east, north edges of the bounding box. The coordinates
are in the coordinate reference system specified in `crs`. By default
this is WGS84 longitude/latitude.
type: array
minItems: 4
maxItems: 6
items:
type: number
example:
- -180
- -90
- 180
- 90
crs:
description: >-
Coordinate reference system of the coordinates in the spatial extent
(property `bbox`). The default reference system is WGS84 longitude/latitude.
In the Core this is the only supported coordinate reference system.
Extensions may support additional coordinate reference systems and add
additional enum values.
type: string
enum:
- 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
default: 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
temporal:
description: >-
The temporal extent of the features in the collection.
type: object
properties:
bbox:
description: >-
One or more time intervals that describe the temporal extent of the dataset.
In the Core only a single time interval is supported. Extensions may support
multiple intervals. If multiple intervals are provided, the union of the
intervals describes the temporal extent.
type: array
minItems: 1
items:
description: >-
Begin and end times of the time interval. The timestamps
are in the coordinate reference system specified in `trs`. By default
this is the Gregorian calendar.
type: array
minItems: 2
maxItems: 2
items:
type: string
format: date-time
example:
- '2011-11-11T12:22:11Z'
- '2012-11-24T12:32:43Z'
trs:
description: >-
Coordinate reference system of the coordinates in the temporal extent
(property `interval`). The default reference system is the Gregorian calendar.
In the Core this is the only supported temporal reference system.
Extensions may support additional temporal reference systems and add
additional enum values.
type: string
enum:
- 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian'
default: 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian'
crs:
description: the list of coordinate reference systems supported by the service; the first item is the default coordinate reference system
type: array
Expand All @@ -421,7 +525,7 @@ properties:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
----

NOTE: The `crs` property is not used by this conformance class, but reserved for future use.
NOTE: The `crs` property of the `collectionInfo` object is not used by this conformance class, but reserved for future use.

.Feature collection metadata response document
=================
Expand All @@ -434,8 +538,9 @@ Representations of the metadata resource in other formats are referenced using l
Additional links to a GML application schema for the building data and to
a web page that has additional information about buildings are provided using link:https://www.iana.org/assignments/link-relations/link-relations.xhtml[link relation type] "describedBy".
Coordinate reference system information is not provided as the service provides
geometries only in the default system (WGS84 longitude/latitude).
Reference system information is not provided as the service provides geometries
only in the default systems (spatial: WGS84 longitude/latitude; temporal:
Gregorian calendar).
[source,JSON]
----
Expand All @@ -454,8 +559,12 @@ geometries only in the default system (WGS84 longitude/latitude).
"title": "Buildings",
"description": "Buildings in the city of Bonn.",
"extent": {
"spatial": [ 7.01, 50.63, 7.22, 50.78 ],
"temporal": [ "2010-02-15T12:34:56Z", "2018-03-18T12:11:00Z" ]
"spatial": {
"bbox": [ [ 7.01, 50.63, 7.22, 50.78 ] ]
},
"temporal": {
"interval": [ [ "2010-02-15T12:34:56Z", "2018-03-18T12:11:00Z" ] ]
}
},
"links": [
{ "href": "http://data.example.org/collections/buildings/items",
Expand Down
14 changes: 14 additions & 0 deletions core/standard/requirements/core/PER_fc-md-extent-extensions.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[width="90%",cols="2,6a"]
|===
|Permission {counter:per-id} |/per/core/fc-md-extent-extensions +

The Core only specifies requirements for spatial and temporal extents.
However, the `extent` object MAY be extended with additional members
to represent other extents, for example, thermal or pressure ranges.

The Core only supports spatial extents in WGS84 longitude/latitude and
temporal extents in the Gregorian calendar (these are the only enum values in
link:https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openapi/schemas/[extent.yaml]).
Extension to the Core MAY add additional reference systems to the
`extent` object.
|===
12 changes: 12 additions & 0 deletions core/standard/requirements/core/REC_fc-md-extent-single.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[fc_md_extent_single]]
[width="90%",cols="2,6a"]
|===
|Recommendation {counter:rec-id} |/rec/core/fc-md-extent-single +

While the spatial and temporal extents support multiple bounding boxes
(`bbox` array) and time intervals (`interval` array) for advanced use cases,
implementations SHOULD provide only a single bounding box or time interval
unless the use of multiple values is important for the use of the dataset
and agents using the API are known to be support multiple bounding boxes
or time intervals.
|===
2 changes: 1 addition & 1 deletion core/standard/requirements/core/REQ_fc-md-extent.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
|===
|*Requirement {counter:req-id}* |/req/core/fc-md-extent +

For each feature collection, the `extent` property, if provided, SHALL be a bounding box that includes all spatial and temporal geometries in this collection.
For each feature collection, the `extent` property, if provided, SHALL provide bounding boxes that include all spatial geometries and time intervals that include all temporal geometries in this collection.

If a feature has multiple properties with spatial or temporal information, it is the decision of the server whether only a single spatial or temporal geometry property is used to determine the extent or all relevant geometries.
|===
Loading

0 comments on commit c47c304

Please sign in to comment.