Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WMS null rectangle check + inherit bbox from ancestor WMS Layers #6864

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

nf-s
Copy link
Contributor

@nf-s nf-s commented Sep 1, 2023

Fix WMS null rectangle check + inherit bbox from ancestor WMS Layers

Fixes #6860

There was a bug that was causing WebMapServiceCatalogItem.rectangle to be {"west": 0,"south": 0,"east": 0,"north": 0} which was breaking cesium internals. I fixed this with a null check.

Additionally, in the WMS spec (for both 1.3.0 and 1.1.1), you can have a hierarchy of Layers and certain parent properties can be inherited by child Layers - for example EX_GeographicBoundingBox - which is used to calculate rectangle. So I added ability to work up through Layer ancestors until a EX_GeographicBoundingBox is found.

In the test case below, the child Layer of interest doesn't have a EX_GeographicBoundingBox, but it's parent does - so it should inherit it.

Changes

  • Add null check to WebMapServiceCatalogItem rectangle calculation - and now we ascend tree of WMS Layers until we find a rectangle.

Test me

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@nf-s nf-s changed the title Fix WMS null rectangle Fix WMS null rectangle check + inherit EX_GeographicBoundingBox from ancestor WMS Layers Sep 1, 2023
@nf-s nf-s changed the title Fix WMS null rectangle check + inherit EX_GeographicBoundingBox from ancestor WMS Layers Fix WMS null rectangle check + inherit bbox from ancestor WMS Layers Sep 1, 2023
@na9da na9da self-assigned this Sep 12, 2023
Copy link
Collaborator

@na9da na9da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nf-s - the changes look good to me.

Just left a small comment.
Also, please remember to move change under the new version header in CHANGES.md.

@nf-s nf-s merged commit 6abb083 into main Sep 12, 2023
@nf-s nf-s deleted the wms-parent-rectangle branch September 12, 2023 03:51
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.

WMS bbox doesn't inherit from parent Layers
2 participants