Reply to topic

Distance calculation between two points

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
121
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
121
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
121
Karma
0
OS
Hm, I guess tessellation along rhumb lines would be helpful as well?

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], claydoh, Dibo, Google [Bot], Sogou [Bot]