How can I find lat long of a point with a given la

2020-07-23 04:01发布

I have a point A (52.132781727864, -106,63492619991302). From point A i would like to get the lat, long of point B which is 5 km South from point A.

How can I get the the lat long of point B? I'm coding in Java.

Edit: If the point is in South-East what should I do?

5条回答
姐就是有狂的资本
2楼-- · 2020-07-23 04:29

5km in angles = ((5 / (6371 * pi)) * 180) = 0.0449660803. This number should be subtracted from the latitude. Longitude remains same.

PS. Thanks to Carlos Heuberger for correction.

查看更多
We Are One
3楼-- · 2020-07-23 04:31

I highly recommend using GeoTools for earth surface geometry, as it factors in the earth as an ellipsoid (the earth is not a perfect sphere). In particular take a look at GeodeticCalculator where you set the starting position and direction (azimuth and distance) and then get the destination position.

查看更多
Animai°情兽
4楼-- · 2020-07-23 04:33

Extending the question to "How can I find lat long of a point with a given lat long value, distance and direction", here an approximation for shorter distances (less than about 1000 km)

d = dist / 111.12      (1)
dlat = d * cos(dir)
latm = lat1 + dlat / 2
dlon = d * sin(dir) / cos(latm)

lat2 = lat1 + dlat
lon2 = lon1 + dlon

Where:
- lat1 and lon1 - the starting coordinates (North and East are positive) - dist - the distance in kilometers
- dir - the starting direction (2)
- lat2 and lon2 - the resulting coordinates

(1) assuming the spherical earth model
(2) dir = 135° for South-East


based on Astrosail - Mittelbreitenverfahren

查看更多
够拽才男人
6楼-- · 2020-07-23 04:55

I had the same problem a little time along. Since in my case the original data was in UTM, the product only had to work in a given zone, and the distance to add was not very big, all I had to do was calculating sinus and cosinus and adding easting and northing to the initial poing

查看更多
登录 后发表回答