-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
Thanks for the pull request @baothientran!
Reviewers, don't forget to make sure that:
|
@kring can you review? |
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. |
@mramato I think the error can be replicated with a simple unit test. I will add it right away |
I think this is ready for review |
@baothientran can you update |
Thanks @baothientran, great catch! |
When rectangles are inserted into the
QuadtreeNode
inTileAvailability
, they are ordered by level using the index returned bybinarySearch()
. 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 exampleBelow 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
After the fix. It is much more detail now
@lilleyse Can you please take a look at it? Please let me know if I should add anything