Repository navigation
pass the transformed bbox's CRS to map providers (#2443) - #2446
Open
ozenyunus35 wants to merge 1 commit into
Open
ozenyunus35 wants to merge 1 commit into
ozenyunus35 wants to merge 1 commit into
Conversation
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). |
Author
|
Thanks, done on both. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
When
bbox-crsdiffers fromcrs,get_collection_maptransforms the bbox intocrsand passes the result to the provider, butquery_args['bbox-crs']kept the original value. A map provider that readsbbox-crs(it arrives inkwargs) 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 toquery_args['crs']. When the two are already the same, nothing changes.Added
test_get_collection_map_bbox_crs_follows_transformed_bboxintests/api/test_maps.py, using a provider that records its query arguments: with a CRS84 bbox andcrs=EPSG:3857, the provider gets a transformed bbox andbbox-crsequal tocrs; with nocrs,bbox-crsand the bbox are passed through unchanged. The first case fails without the change.tests/api/test_maps.pypasses 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)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)