Repository navigation
Conversation
karussell
commented
May 16, 2024
Comment on lines
+1064
to
1076
| updateDistancesFor(graph, 0, 3, 0, 0); | ||
| updateDistancesFor(graph, 3, 2.5, 0, 0); | ||
| updateDistancesFor(graph, 5, 1, 0, 0); | ||
| updateDistancesFor(graph, 8, 0, 0, 0); | ||
| updateDistancesFor(graph, 1, 3, 1, 0); | ||
| updateDistancesFor(graph, 4, 2, 1, 0); | ||
| updateDistancesFor(graph, 6, 1, 1, 0); | ||
| updateDistancesFor(graph, 9, 0, 1, 0); | ||
| updateDistancesFor(graph, 2, 3, 2, 0); | ||
| updateDistancesFor(graph, 11, 2, 2, 0); | ||
| updateDistancesFor(graph, 7, 1, 2, 0); | ||
| updateDistancesFor(graph, 10, 0, 2, 0); | ||
| } |
Member
Author
There was a problem hiding this comment.
if we do not set the elevation we internally use NaN in PointAccess.setNode
karussell
commented
May 16, 2024
| public static int eleToUInt(double ele) { | ||
| if (Double.isNaN(ele)) throw new IllegalArgumentException("elevation cannot be NaN"); | ||
| if (ele < -1000) return -1000; | ||
| if (ele >= Integer.MAX_VALUE / ELE_FACTOR - 1000) return Integer.MAX_VALUE; |
Member
Author
There was a problem hiding this comment.
we only have 3 bytes for storage so MAX_VALUE is too big
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.
After #3002 an elevation value of NaN got converted to -1000 implicitly (occurs only for SRTM).
We should use 0 as it was before or let it configure.