Given the lat/lon of 2 close points on earth (<10m), How do I calculate the distance in metres?

Posted by Rory on Stack Overflow See other posts from Stack Overflow or by Rory
Published on 2010-06-14T13:35:57Z Indexed on 2010/06/14 13:42 UTC
Read the original article Hit count: 154

I have the lat/lon of 2 points on the earth. They are really close together, <10m. Let's assume the earth is flat. How do I calculate the distance between them in metres?

I know about tools (PostGIS, etc.) that can do this correctly, however I'm just doing a rough and ready type, and I'm OK with low accuracy. At such small sizes a difference of 1% is only 10cm, which is fine for me. I'm doing this in stock python. I'm OK with a standard Euclidean distance thing.

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about geometry