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
483 stars 259 forks source link

EDR /items Queries Always Routed to OAF Provider #1748

Closed webb-ben closed 1 month ago

webb-ben commented 1 month ago

Description When executing EDR /items queries, the requests never reach the EDR provider because the /items Flask route always defaults to using an OAF provider instead of the intended EDR provider.

Steps to Reproduce

  1. Set up a pygeoapi instance with an EDR provider enabling an items query:
    @BaseEDRProvider.register()
    def items(self, **kwargs):
  2. Execute an /items query against the EDR endpoint.
  3. Observe that the query is not processed by the EDR provider but is instead routed to the OGC API - Features provider.

Expected behavior The /items query should be processed by the configured EDR provider, not the Features provider.

Screenshots/Tracebacks If applicable, add screenshots to help explain your problem.

Environment

Additional context Note I am able to seamless run both an EDR and Features provider by providing configurations for both providers, as such the EDR /items links are successfully resolved by the feature provider. @tomkralidis is this the intended behavior for pygeoapi?

    providers:
      - type: edr
        name: pygeoapi_plugins.provider.sensorthings_edr.SensorThingsEDRProvider
        data: http://host.docker.internal:8999/FROST-Server/v1.1
      - type: feature
        name: pygeoapi.provider.sensorthings.SensorThingsProvider
        data: http://host.docker.internal:8999/FROST-Server/v1.1/Things
tomkralidis commented 1 month ago

@webb-ben yes, that's the intended behaviour, since there is no way from a routing perspective to determine whether an .../items endpoint is EDR or OGC API - Features without special handling (which would be too early in the codepath/lifecycle).

Perhaps this can be documented accordingly, then.