More full implement WFS3
Closed this issue · 1 comments
This is a follow-on to #46 with the additional endpoints that we would need to come close to WFS compliance. It is written in
ranked order of importance. All would be needed to be compliant, but each gets us closer to getting the spirit of the spec
- landing page at https://sat-api.developmentseed.org/ The minimal to be compatible would be:
{
"links": [
{ "href": "https://sat-api.developmentseed.org/",
"rel": "self", "type": "application/json", "title": "This document" },
{ "href": "https://sat-api.developmentseed.org/collections",
"rel": "data", "type": "application/json", "title": "Metadata about the feature collections" }
]
}
To be fully WFS3 compliant there would also be links to /api and /conformance but I'd say those are lower priorities, and listed below.
- /collections/ endpoint should return a json document that lists all the core collections information. For sat-api with landsat and sentinel it would like:
{
"links": [
{ "href": "https://sat-api.developmentseed.org/collections.json",
"rel": "self", "type": "application/json", "title": "this document" },
],
"collections": [
{
"name": "landsat-8-l1",
"title": "Landsat 8 Level 1",
"description": "Landsat 8 is a mission of USGS, etc.",
"extent": {
"spatial": [ -180, -90, 180, 90 ],
"temporal": [ "2013-04-11T00:00:00Z", "2018-06-29T12:11:00Z" ]
},
"links": [
{ "href": "https://sat-api.developmentseed.org/collections/landsat-8-l1/items",
"rel": "item", "type": "application/geo+json",
"title": "Scenes" },
{ "href": "https://sat-api.developmentseed.org/collections/landsat-8-l1/description",
"rel": "item", "type": "application/geo+json",
"title": "Landsat 8 Level 1 Collection Descriptions" }
]
},
{
"name": "sentinel-2-l1c",
"title": "Sentinel 2 Level 1C",
"description": "Sentinel 2 is a mission of ESA, etc.",
"extent": {
"spatial": [ -180, -90, 180, 90 ],
"temporal": [ "2015-06-29T00:00:00Z", "2018-06-29T12:11:00Z" ]
},
"links": [
{ "href": "https://sat-api.developmentseed.org/collections/sentinel-2-l1c/items",
"rel": "item", "type": "application/geo+json",
"title": "Granules" },
{ "href": "https://sat-api.developmentseed.org/collections/landsat-8-l1/description",
"rel": "item", "type": "application/geo+json",
"title": "Sentinel 2 Level 1C Collection Descriptions" }
}
]
}
Each new dataset, like CBERS or MODIS would add its own.
-
/collections/{collectionName} endpoint The next step should be pretty easy, it's just instead of the list at /collections/ just put each 'name' at its own endpoint.
-
/api For this you need to return the openapi spec of the service. If you're not adding new endpoints super often this should be easy enough to do by hand. But of course ideally it's autogenerated. Can start with https://github.com/radiantearth/stac-spec/blob/master/api-spec/WFS3core%2BSTAC.yaml and just shift the endpoint names. It has the /search/stac endpoint and the WFS endpoints.
And in the root document /
should add:
{ "href": "http://data.example.org/api",
"rel": "service", "type": "application/openapi+json;version=3.0", "title": "the API definition" },
It can be ok to do step #5 first, and then this.
- /conformance endpoint. This should be pretty easy. Just make a https://sat-api.developmentseed.org/conformance endpoint and add
{
"conformsTo": [
"http://www.opengis.net/spec/wfs-1/3.0/req/core",
"http://www.opengis.net/spec/wfs-1/3.0/req/oas30",
"http://www.opengis.net/spec/wfs-1/3.0/req/geojson"
]
}
If you skipped to this step past #4 then just don't include the oas30 conformance.
And in the root document /
should add:
{ "href": "http://data.example.org/conformance",
"rel": "conformance", "type": "application/json", "title": "WFS 3.0 conformance classes implemented by this server" },
While /api and /conformance are not currently supported here, /api is not included in the most recent STAC spec.
Most of these endpoints are implemented, so I am closing this issue in favor of opening more specific future issues as needed.