如何找到具有给定经纬度值和距离的点的经纬度

发布于 2024-10-19 22:06:32 字数 172 浏览 5 评论 0原文

我有一个点A(52.132781727864,-106,63492619991302)。从 A 点,我想获取 B 点的经纬度,B 点位于 A 点以南 5 公里处。

我怎样才能获得 B 点的经纬度?我正在用 Java 编码。

编辑:如果该点位于东南部,我该怎么办?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

ヅ她的身影、若隐若现 2024-10-26 22:06:32

5 公里的角度 = ((5 / (6371 * pi)) * 180) = 0.0449660803。应从纬度中减去该数字。经度保持不变。

附言。感谢 Carlos Heuberger 的更正。

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.

回眸一笑 2024-10-26 22:06:32

我强烈建议使用 GeoTools 来处理地球表面几何形状,因为它将地球视为椭球体(地球不是一个完美的球体)。特别是查看 GeodeticCalculator,您可以在其中设置起始位置和方向(方位角和距离),然后获取目的地位置。

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.

撩人痒 2024-10-26 22:06:32

将问题扩展为“如何找到具有给定经纬度值、距离和方向的点的经纬度”,这里是较短距离(小于约 1000 公里)的近似值,

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

其中:
- lat1lon1 - 起始坐标(北和东为正)
- dist - 以公里为单位的距离
- dir - 起始方向(2)
- lat2lon2 - 所得坐标

(1) 假设球形地球模型
(2) dir = 135° 为东南


基于 Astrosail - Mittelbreitenverfahren

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

守护在此方 2024-10-26 22:06:32

我有一段时间也遇到了同样的问题。由于在我的例子中,原始数据是UTM,产品只需在给定区域中工作,并且添加的距离不是很大,我所要做的就是计算正弦和余弦,并将东移和北移添加到初始数据中。波普

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文