## Distance calculation between two points

fbarbarin
Registered Member
Posts
16
Karma
0

### Distance calculation between two points

Wed Apr 15, 2015 9:33 am
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 ?

fbarbarin
Registered Member
Posts
16
Karma
0

### Re: Distance calculation between two points

Mon Apr 27, 2015 7:21 am
Up
tackat
KDE Developer
Posts
121
Karma
0
OS

### Re: Distance calculation between two points

Wed Apr 29, 2015 9:15 pm
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

### Re: Distance calculation between two points

Tue Jun 23, 2015 8:11 am
Hello,
Thanks for your answer but this method returns only the distance following a great circle. What about a rhumb line distance ?
tackat
KDE Developer
Posts
121
Karma
0
OS

### Re: Distance calculation between two points

Sat Jun 27, 2015 11:32 am
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.
Earthwings
KDE Developer
Posts
172
Karma
1
OS

### Re: Distance calculation between two points

Mon Jul 06, 2015 8:34 pm
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.
tackat
KDE Developer
Posts
121
Karma
0
OS

### Re: Distance calculation between two points

Mon Jul 06, 2015 8:38 pm
Hm, I guess tessellation along rhumb lines would be helpful as well?

## Who is online

Registered users: Baidu [Spider], Bing [Bot], Exabot [Bot], Google [Bot], kyrhammer, ranksdirect, Snudl, wojtryb