Repository navigation
Round elevation and degrees before casting to int, fix barrier edge artifacts - #3011
Merged
Merged
Conversation
Member
|
In master there seems to be test failures Is this something problematic or does it need just a minor adaptation? |
Member
Author
|
No, this is only because of a marginal elevation change due to #3011. I just fixed this. |
Member
|
Thanks! |
This branch was previously 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.
When we create barrier edges we copy existing nodes. For this we first read the coordinates and the elevation from the storage and then write the same values into the storage for the new node. The way we currently convert the integer representation of the lat/lon degrees and the elevation to a double value and back to the integer representation this can result in a small offset between the coordinates. For this reason there are barrier edges for which the base and adj node coordinates aren't identical. This looks like this when we zoom in:
Here I added a call to
Math.roundbefore we cast the scaled double value to int to fix this.