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 the wrong order of the boundary rectangles in TileAvailability #9098

Merged
merged 5 commits into from
Aug 19, 2020

Conversation

baothientran
Copy link
Contributor

@baothientran baothientran commented Aug 18, 2020

When rectangles are inserted into the QuadtreeNode in TileAvailability, they are ordered by level using the index returned by binarySearch(). However, it negates the index when it is 0, which results in the wrong order of the rectangle lists and wrongly identify a tile is not available. This is the Sandcastle example

Below is the visual problem:

Before the fix. The tile is not really detail because it is falsely identified as unavailable and therefore, upsampled from the parent
Screenshot_20200818_013710

After the fix. It is much more detail now
Screenshot_20200818_013345

@lilleyse Can you please take a look at it? Please let me know if I should add anything

@cesium-concierge
Copy link

Thanks for the pull request @baothientran!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@lilleyse
Copy link
Contributor

@kring can you review?

@mramato
Copy link
Contributor

mramato commented Aug 18, 2020

I'll be that guy and ask if there is an easy way to add a unit test for this? Only if it doesn't require a massive amount of hoop-jumping.

@baothientran
Copy link
Contributor Author

@mramato I think the error can be replicated with a simple unit test. I will add it right away

@baothientran
Copy link
Contributor Author

I think this is ready for review

@lilleyse lilleyse requested a review from kring August 18, 2020 21:22
@lilleyse
Copy link
Contributor

@baothientran can you update CHANGES.md?

@kring
Copy link
Member

kring commented Aug 19, 2020

Thanks @baothientran, great catch!

@kring kring merged commit d33cff0 into master Aug 19, 2020
@kring kring deleted the wrong-boundary-rectangle branch August 19, 2020 01:52
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.

5 participants