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

wxGUI/wxplot: fix profile plot segmentation points position #3601

Merged

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Apr 16, 2024

Fixes #3418.

If EPSG 4326 WGS84 ellipsoid is used as coordinate system.

For calculating distance between two points is used Haversine formula.

https://www.igismap.com/haversine-formula-calculate-geographic-distance-earth/
@tmszi tmszi added this to the 8.4.0 milestone Apr 16, 2024
@tmszi tmszi self-assigned this Apr 16, 2024
@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Apr 16, 2024
@tmszi tmszi added bug Something isn't working backport to 8.3 labels Apr 16, 2024
@petrasovaa
Copy link
Contributor

@tmszi
Copy link
Member Author

tmszi commented Apr 16, 2024

How about using the c function: https://github.com/OSGeo/grass/blob/main/gui/wxpython/mapwin/analysis.py#L257

Yes you are right, I fixed it with G_distance() C func commit 62eaf7f.

Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

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

I didn't test but it looks good to me.

@echoix echoix merged commit 9b28d7b into OSGeo:main Apr 17, 2024
26 checks passed
@tmszi tmszi deleted the wxgui-wxplot-fix-profile-plot-segemnt-break-point-pos branch April 17, 2024 11:10
tmszi added a commit to tmszi/grass that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Profile Analysis Tool Segment break points position
4 participants