geopython / pygeoapi

pygeoapi is a Python server implementation of the OGC API suite of standards. The project emerged as part of the next generation OGC API efforts in 2018 and provides the capability for organizations to deploy a RESTful OGC API endpoint using OpenAPI, GeoJSON, and HTML. pygeoapi is open source and released under an MIT license.
https://pygeoapi.io
MIT License
476 stars 255 forks source link

add CITE setup for Tiles #1728

Open tomkralidis opened 1 month ago

tomkralidis commented 1 month ago

Our CITE configuration defines all standards which we support/are compliant to/are an RI for. We need to add an appropriate setup for OGC API - Tiles (perhaps https://github.com/geopython/demo.pygeoapi.io/blob/master/services/pygeoapi_master/local.config.yml#L128-L164).

tomkralidis commented 1 month ago

@doublebyte1 for review:

doublebyte1 commented 1 month ago

I think we need to wait for the CITE team to sort out this issue: https://github.com/opengeospatial/ets-ogcapi-tiles10/issues/28

tomkralidis commented 1 week ago

@doublebyte1 @PascalLike I tested both https://demo.pygeoapi.io/cite and a local pygeoapi build (based on the setup / instructions documented in https://github.com/geopython/pygeoapi/wiki/OGCCompliance), against a local master branch build of the OGC API - Tiles ETS with the following (2) failures:

1.

Conformance class: Core: Requirement 5A states that a successful execution of the tile operation with content SHALL be reported as a response with an HTTP status code 200. However the respose code was 404. 2. Conformance Class: Dataset Tilesets: Requirement 11 states that if the API has a mechanism for exposing root resources (e.g. a landing page) the API SHALL advertise at least one URI to retrieve a tilesets list provided by this service with a link having a rel value: http://www.opengis.net/def/rel/ogc/1.0/tilesets-vector http://www.opengis.net/def/rel/ogc/1.0/tilesets-map or http://www.opengis.net/def/rel/ogc/1.0/tilesets-coverage. However the landing page did not have any such links.

Any idea?

doublebyte1 commented 6 days ago

Hi @tomkralidis!

@doublebyte1 @PascalLike I tested both https://demo.pygeoapi.io/cite and a local pygeoapi build (based on the setup / instructions documented in https://github.com/geopython/pygeoapi/wiki/OGCCompliance), against a local master branch build of the OGC API - Tiles ETS with the following (2) failures:

Conformance class: Core: Requirement 5A states that a successful execution of the tile operation with content SHALL be reported as a response with an HTTP status code 200. However the respose code was 404.

Would it be possible to send the urls that are triggering the 404 error?

Conformance Class: Dataset Tilesets: Requirement 11 states that if the API has a mechanism for exposing root resources (e.g. a landing page) the API SHALL advertise at least one URI to retrieve a tilesets list provided by this service with a link having a rel value: http://www.opengis.net/def/rel/ogc/1.0/tilesets-vector http://www.opengis.net/def/rel/ogc/1.0/tilesets-map or http://www.opengis.net/def/rel/ogc/1.0/tilesets-coverage. However the landing page did not have any such links.

Any idea?

I think we are hitting this issue again. pygeoapi does not claim to offer any dataset tilesets and thus it should be not tested for that.

tomkralidis commented 6 days ago

Would it be possible to send the urls that are triggering the 404 error?

doublebyte1 commented 6 days ago
  • 0/2147483647/2147483647

I am assuming you are testing this collection on the cite instance.

In that case, the url template would be:

https://demo.pygeoapi.io/cite/collections/lakes/tiles/WebMercatorQuad/{tileMatrix}/{tileRow}/{tileCol}?f=pbf

This should trigger a 200 response:

https://demo.pygeoapi.io/cite/collections/lakes/tiles/WebMercatorQuad/0/0/0\?f\=pbf

curl -I https://demo.pygeoapi.io/cite/collections/lakes/tiles/WebMercatorQuad/0/0/0\?f\=pbf

HTTP/2 200
access-control-allow-origin: *
content-language: en-US
content-type: pbf
date: Thu, 22 Aug 2024 16:04:01 GMT
server: gunicorn
x-powered-by: pygeoapi 0.18.dev0
content-length: 2960

In the other case, a 404 is correct, because that tile does not exist.

https://demo.pygeoapi.io/cite/collections/lakes/tiles/WebMercatorQuad/0/2147483647/2147483647\?f\=pbf

curl -I https://demo.pygeoapi.io/cite/collections/lakes/tiles/WebMercatorQuad/0/2147483647/2147483647\?f\=pbf

HTTP/2 404
access-control-allow-origin: *
content-language: en-US
content-type: pbf
date: Thu, 22 Aug 2024 16:04:43 GMT
server: gunicorn
x-powered-by: pygeoapi 0.18.dev0
content-length: 97

According to section 7.17 of the Standard (Error conditions):

If the path parameter values tileMatrix, tileRow, tileCol for a tile request are out-of-range (outside the tile matrix set or tile matrix set limits of the resource), the HTTP response SHALL use a status code 404 or a 400. The response can also contain an exception report.

@tomkralidis let me know if I'm missing something here.

tomkralidis commented 6 days ago

@doublebyte1 for the first issue, it was a copy/paste error on my part (I've updated https://github.com/geopython/pygeoapi/wiki/OGCCompliance#ogc-api---tiles accordingly).

For the second 404, this is maybe not an ETS error (intentionally triggering a 404).

The remaining issue thus remains related to clarification of https://github.com/opengeospatial/ets-ogcapi-tiles10/issues/28

doublebyte1 commented 5 days ago

@doublebyte1 for the first issue, it was a copy/paste error on my part (I've updated https://github.com/geopython/pygeoapi/wiki/OGCCompliance#ogc-api---tiles accordingly).

For the second 404, this is maybe not an ETS error (intentionally triggering a 404).

The remaining issue thus remains related to clarification of opengeospatial/ets-ogcapi-tiles10#28

@tomkralidis @dstenger I opened a new issue here. https://github.com/opengeospatial/ets-ogcapi-tiles10/issues/30 It is the same issue (the test suite expecting Dataset tilesets) on a different requirement (11),

tomkralidis commented 5 days ago

@doublebyte1 @dstenger FYI I now tested with the following setup:

With the above setup, tests fully pass and the Dataset tileset Conformance Class skipped per the pending the PR.

This means that once the PR is merged and we have an associated release of the ETS, pygeoapi should continue to be compliant.