Skip to content

pass the transformed bbox's CRS to map providers (#2443) - #2446

Open
ozenyunus35 wants to merge 1 commit into
geopython:masterfrom
ozenyunus35:fix/maps-bbox-crs-after-transform
Open

ozenyunus35 wants to merge 1 commit into
geopython:masterfrom
ozenyunus35:fix/maps-bbox-crs-after-transform

Conversation

@ozenyunus35

@ozenyunus35 ozenyunus35 commented Oct 15, 2026 •

Copy link
Copy Markdown

Overview

When bbox-crs differs from crs, get_collection_map transforms the bbox into crs and passes the result to the provider, but query_args['bbox-crs'] kept the original value. A map provider that reads bbox-crs (it arrives in kwargs) was told the bbox was still in, for example, CRS84 while its coordinates were in EPSG:3857, as in the example in the issue.

After the transform, query_args['bbox-crs'] is now set to query_args['crs']. When the two are already the same, nothing changes.

Added test_get_collection_map_bbox_crs_follows_transformed_bbox in tests/api/test_maps.py, using a provider that records its query arguments: with a CRS84 bbox and crs=EPSG:3857, the provider gets a transformed bbox and bbox-crs equal to crs; with no crs, bbox-crs and the bbox are passed through unchanged. The first case fails without the change. tests/api/test_maps.py passes and flake8 is clean.

Related Issue / discussion

Fixes #2443

Additional information

I used an AI assistant to help draft parts of the code and tests; I reviewed the changes and ran the tests myself.

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

@ricardogsilva

Copy link
Copy Markdown
Member

@ozenyunus35 this seems good to me (I'm not able to merge though).

I'd just add that since you are a new contributor, you'll need to check the box in the PR description that confirms your contribution complies with the pygeoapi license (and the same for #2445).

@ozenyunus35

Copy link
Copy Markdown
Author

Thanks, done on both.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

map providers can sometimes be passed incorrect bbox-crs value

2 participants