开发者

Converting longitude latitude degrees to miles in Java

开发者 https://www.devze.com 2023-02-28 08:53 出处:网络
How do you convert degrees (longitude latitude) to miles in Java? For 开发者_高级运维example if I want to move longitude by 69.11 miles, I add 1 degree. Do I do simple calculation or should I use so

How do you convert degrees (longitude latitude) to miles in Java?

For 开发者_高级运维example if I want to move longitude by 69.11 miles, I add 1 degree. Do I do simple calculation or should I use some kind of API.


From http://www.meridianworlddata.com/Distance-Calculation.asp:

Improved approximate distance in miles:

    sqrt(x * x + y * y)

where x = 69.1 * (lat2 - lat1)
and y = 69.1 * (lon2 - lon1) * cos(lat1/57.3) 

There were a few other good sites on the google.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号