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

[Bugfix] JS Digitizing measure : Provide map projection #4730

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

rldhont
Copy link
Collaborator

@rldhont rldhont commented Sep 5, 2024

In OL sphere API documentation https://openlayers.org/en/latest/apidoc/module-ol_sphere.html for getLength and getArea, it is assumed that the default projection is ESPG:3857.
If the map is in EPSG:2154 projection, the getLength's error is arround 40% without projection provided.

Before the fix
Capture d’écran 2024-09-05 à 16 30 09

After the fix
Capture d’écran 2024-09-05 à 16 33 54

Funded by Conseil Départemental du Calvados

In OL sphere API documentation https://openlayers.org/en/latest/apidoc/module-ol_sphere.html for `getLength` and `getArea`, it is assumed that the default projection is `ESPG:3857`.
If the map is in `EPSG:2154` projection, the `getLength`'s error is arround 40% without projection provided.

Funded by Conseil Départemental du Calvados
@rldhont rldhont added user interface javascript Pull requests that update Javascript code run end2end If the PR must run end2end tests or not backport release_3_7 backport release_3_8 labels Sep 5, 2024
@github-actions github-actions bot added this to the 3.9.0 milestone Sep 5, 2024
@rldhont rldhont merged commit 53cd25c into 3liz:master Sep 6, 2024
13 checks passed
@3liz-bot
Copy link
Contributor

3liz-bot commented Sep 6, 2024

The backport to release_3_7 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 991d72139... Tests: Update draw project
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging assets/src/modules/Digitizing.js
[backport-4730-to-release_3_7 c656d7740] [Bugfix] JS Digitizing measure : Provide map projection
 Author: rldhont <[email protected]>
 Date: Thu Sep 5 16:35:52 2024 +0200
 1 file changed, 2 insertions(+), 2 deletions(-)
Auto-merging tests/qgis-projects/tests/draw.qgs
CONFLICT (content): Merge conflict in tests/qgis-projects/tests/draw.qgs
Auto-merging tests/qgis-projects/tests/draw.qgs.cfg
CONFLICT (content): Merge conflict in tests/qgis-projects/tests/draw.qgs.cfg

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release_3_7 release_3_7
# Navigate to the new working tree
cd .worktrees/backport-release_3_7
# Create a new branch
git switch --create backport-4730-to-release_3_7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 4778cacee791b43156c80eaa6081e2c2d83d1898,991d721399174ae9a907bcb5e7af156b7cd77eb5,01d0ef879e7243ce699a555227c3e873ac7d026a
# Push it to GitHub
git push --set-upstream origin backport-4730-to-release_3_7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release_3_7

Then, create a pull request where the base branch is release_3_7 and the compare/head branch is backport-4730-to-release_3_7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_7 backport release_3_8 failed backport javascript Pull requests that update Javascript code run end2end If the PR must run end2end tests or not user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants