This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Distance calculation between two points

Tags: None
(comma "," separated)
fbarbarin
Registered Member
Posts
16
Karma
0
Hi all,

I know that Marble provides method to calculate distance between two points (from their Lat/Lon coordinates I guess) but I can't find it in the source code. Could you tell where it is ?
Maybe this calculation is only provided with the Measure Plugin ?

Thanks for your answers
fbarbarin
Registered Member
Posts
16
Karma
0
Up
Please someone ?
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS
You can measure the length across an arbitrary number of points using

qreal GeoDataLineString::length( qreal planetRadius, int offset = 0 ) const;
fbarbarin
Registered Member
Posts
16
Karma
0
Hello,
Thanks for your answer but this method returns only the distance following a great circle. What about a rhumb line distance ?
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS
There is no support for calculating the rhumb line distance in Marble between two points. It would be great though if this feature was added. So if you feel like providing patches we'd gladly add this feature to Marble. :-)
User avatar
Earthwings
KDE Developer
Posts
172
Karma
1
OS
http://www.movable-type.co.uk/scripts/latlong.html might be helpful for the implementation. Didn't check it in detail, just remembering this site was useful a couple of times already.
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS
Hm, I guess tessellation along rhumb lines would be helpful as well?


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]