You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
map providers can sometimes be passed incorrect bbox-crs value #2443
when preparing a response for a static map request, pygeoapi does some pre-processing of inputs and then passes them to a map provider for rendering the image.
After initial parsing, if bbox-crs is different from crs, pygeoapi transforms the bbox parameter to the crs specified in crs, as can be seen in:
The result of this coordinate transformation is then used to replace the value of query_args['bbox']. However, the value of query_args['bbox_crs'] is never updated to match the CRS of the newly transformed bbox.
This means that when the map provider is given the query_args dict, it can sometimes contain an incorrect value for the bbox-crs key.
As an example, I'm seeing these as the input parameters to my custom map provider's query() method:
An additional issue I've noted with the bbox-crs key of the query_args dict is that this uses a dash in its name, which cannot be used when creating Python identifiers.
This is not a problem per se, but makes the API for downstream map providers more awkward than it needs to be, as it means all map providers are thus forced to accept a **kwargs argument in their respective query() methods because bbox-crs would not be a valid name in a Python function signature.
Hi, I'd like to take this one. The fix is to set bbox-crs to crs right after the bbox is transformed in get_collection_map, plus a test that checks what the provider receives. I see #2446 tried this and was closed, so let me know if you'd rather handle it differently or if it should wait for #2475.
Activity
ricardogsilva commentedon Oct 23, 2026
An additional issue I've noted with the
bbox-crskey of thequery_argsdict is that this uses a dash in its name, which cannot be used when creating Python identifiers.This is not a problem per se, but makes the API for downstream map providers more awkward than it needs to be, as it means all map providers are thus forced to accept a
**kwargsargument in their respectivequery()methods becausebbox-crswould not be a valid name in a Python function signature.amantebriwal4321 commentedon Nov 3, 2026
Hi, I'd like to take this one. The fix is to set bbox-crs to crs right after the bbox is transformed in get_collection_map, plus a test that checks what the provider receives. I see #2446 tried this and was closed, so let me know if you'd rather handle it differently or if it should wait for #2475.