Opened 10 years ago

Last modified 9 years ago

#12427 closed enhancement

[patch] add curvature based distance calculation to LatLon class, add way segment lengths between nodes to InspectorDialog — at Version 1

Reported by: cmuelle8 Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc: latlon, distance, segment, length, curvature, greatCircle, meridional

Description (last modified by cmuelle8)

An elliptical function for length calculation has not yet been added.

AUTO value of DistanceTypes in LatLon class should later on decide sensible what distance Calculation to use - i.e. in very high zoom with close LatValues, curvature based algorithm can be used.

Additionally the ellipsoid and datum are now gettable from josm's main projection instance..

Additional info on the net can be found here:

http://clynchg3c.com/Technote/geodesy/radiigeo.pdf

and here:

https://en.wikipedia.org/wiki/Earth_radius#Radii_of_curvature

Greetings

ps: please review and test - this is core functionality, so please do not apply without having tested it a second/third time - that said, the main distance function is still greatCircleDistance - performance-wise I guess we could use the curvature based function as well, and it promises to be (a little) more accurate when editing locally - comparing the functions at runtime can be done by drawing a way and then using Ctrl+I to get the Inspector..

Change History (1)

comment:1 by cmuelle8, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.