2009/5/4 Fabrizio Carrai <[email protected]>:
> Have a look at http://jan.ucc.nau.edu/~cvm/latlongdist.html
> There is also the code of the simple calculation you need.
> Of course, this is valid for a way linking two nodes. If the distance you
> want to measure is made of several elementar ways, you have to sum of all
> the lengths.
> Hope this is what you asked for.
> Fabrizio
>
> 2009/5/4 Peter Childs <[email protected]>
>>
>> I'm probably being completely stupid, But....
>>
>> How do I find the distance between two nodes or indeed the length of a
>> way. Ideally in miles or km.
>>
>> Sounds simple but I can't find a simple answer, and the ones I can
>> find don't seam to come up with the right answer.....
>>
>> Thanks in advance
>>
>> Peter.
>>
>> _______________________________________________
>> newbies mailing list
>> [email protected]
>> http://lists.openstreetmap.org/listinfo/newbies
>
>
> _______________________________________________
> newbies mailing list
> [email protected]
> http://lists.openstreetmap.org/listinfo/newbies
>
>

Hmm Short answer.. There is not one.; due to the fact that the earth
is not a sphere.

For speed many of the route find code uses Pythagoras and ignores real units.

There are about 3 different formulas in current use most of which
depend upon the radius of the planet; Vincenty, Haversine, and
spherical law of cosines they are various degrees of accuracy
depending on where you are.

See http://www.movable-type.co.uk/scripts/latlong.html

Peter Childs

_______________________________________________
newbies mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/newbies

Reply via email to