Closed webb-ben closed 2 months ago
This is rooted in pygeoapi defining the EDR routes (in Flask/etc.) explicitly. When a "foreign" query type is defined in an EDR provider (say foo
) , Flask does not resolve the route, which causes Flask/pygeoapi to think the collection/foo
is a hierarchical collection. It makes sense to constrain EDR providers, then, to bind to query types defined exclusively in the standard.
Description pygeoapi allows you to register any function to
@BaseEDRProvider.register()
, and will generate relative links for any edr provider that is registered. However when you try to navigate to the query itself, you receive an uninformative error - collection not found. This is because instead of finding the query, pygeoapi tries to find the collection that is namedCOLLECTON_NAME/EDR_QUERY_TYPE
Steps to Reproduce
Create plugin with an EDR query that doesnt exist:
Visit the collection page, and try to navigate to the offered EDR query
View the error, collection not found. That is because it is looking for the collection named
RISEEDR/location
instead of the locaation query of the RISEEDR providerExpected behavior pygeoapi does not allow the registration of invalid EDR query types, and throws an informative error when someone tries to register a query that is not valid.
Screenshots/Tracebacks
Environment
Additional context cc @C-Loftus