PB-583 : use backend service to get LV03 <> LV95 conversion right#887
Merged
PB-583 : use backend service to get LV03 <> LV95 conversion right#887
Conversation
Passing run #2434 ↗︎Details:
Review all test suite changes for PR #887 ↗︎ |
|||||||||||||||
ltshb
approved these changes
Jun 10, 2024
Comment on lines
+45
to
+47
| log.error('Error while re-framing coordinate', lv95coordinate, error) | ||
| reject(error) | ||
| }) |
Contributor
There was a problem hiding this comment.
Why don't use the fallback as well here ?
Contributor
Author
There was a problem hiding this comment.
because if wrong coordinate are given as input, we will end up here (among other cases). And I didn't want to run a proj4 call on malformed coordinate, as it would require another try...catch wrapping
Using proj4 isn't accurate enough on a geodesic point of view, as the conversion isn't linear. There's a backend service that does the computation in a proper manner, so that's what is being used here when showing a LV03 value in the location popup. Tracking the mouse position while moving the cursor can still be done with a simple matrix transform, it's "good enough"
0b0a0bf to
7088d98
Compare
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.
Using proj4 isn't accurate enough on a geodesic point of view, as the conversion isn't linear. There's a backend service that does the computation in a proper manner, so that's what is being used here when showing a LV03 value in the location popup. Tracking the mouse position while moving the cursor can still be done with a simple matrix transform, it's "good enough"
Test link