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

PB-583 : use backend service to get LV03 <> LV95 conversion right #887

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Jun 10, 2024

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

Copy link

cypress bot commented Jun 10, 2024

Passing run #2434 ↗︎

0 208 20 0 Flakiness 0

Details:

PB-583 : use backend service to get LV03 <> LV95 conversion right
Project: web-mapviewer Commit: 7088d98df4
Status: Passed Duration: 08:32 💡
Started: Jun 10, 2024 3:24 PM Ended: Jun 10, 2024 3:33 PM

Review all test suite changes for PR #887 ↗︎

Comment on lines +45 to +47
log.error('Error while re-framing coordinate', lv95coordinate, error)
reject(error)
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't use the fallback as well here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
@pakb pakb force-pushed the feat_PB-583_use_backend_to_get_lv03 branch from 0b0a0bf to 7088d98 Compare June 10, 2024 15:20
@pakb pakb merged commit 2f1ab9f into develop Jun 10, 2024
6 checks passed
@pakb pakb deleted the feat_PB-583_use_backend_to_get_lv03 branch June 10, 2024 15:34
@cypress cypress bot mentioned this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants