给定纬度、经度和航向,如何确定距该点 x 米的纬度/经度?

发布于 2024-11-08 18:10:45 字数 130 浏览 0 评论 0原文

我有一系列的纬度/经度,代表某个物体的中心。我需要在中心两侧 x 米的点上画一条线并且它需要垂直于航向(想象一个大写的T

最终我想要获取这条线端点的纬度/经度。

谢谢!

I have a series of lat/lon which represents the center of some object. I need to draw a line through this point that is x meters on either side of the center and it needs to be perpendicular to the heading (imagine a capital T)

Ultimately I want to get the lat/lon of this line's endpoints.

Thanks!

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

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

发布评论

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

评论(2

姐不稀罕 2024-11-15 18:10:45

基本计算在这个类似问题的答案中:在知道起点和距离的情况下计算第二个点。计算与主航向垂直且距您想要的距离的两个航向的点。

The basic calculation is in this similar question's answer: Calculate second point knowing the starting point and distance. Calculate the points for the two headings perpendicular to the main heading the distance away you want.

九歌凝 2024-11-15 18:10:45

查看:方位和距离的核心位置扩展

包含这些扩展和两个点在第一行上,您应该能够获得方位,添加/减去 pi/2 并找到两侧的点,如下所示:

double bearing = [bottomOfT bearingInRadiansTowardsLocation:topOfT];
CLLocation *left = [topOfT newLocationAtDistance:meters
                             alongBearingradians:bearing+M_PI/2];
CLLocation *right = [topOfT newLocationAtDistance:meters
                              alongBearingradians:bearing-M_PI/2];

Have a look at: Core Location extensions for bearing and distance

With those extensions and two points on the initial line you should be able to get the bearing, add/subtract pi/2 and find points to either side like this:

double bearing = [bottomOfT bearingInRadiansTowardsLocation:topOfT];
CLLocation *left = [topOfT newLocationAtDistance:meters
                             alongBearingradians:bearing+M_PI/2];
CLLocation *right = [topOfT newLocationAtDistance:meters
                              alongBearingradians:bearing-M_PI/2];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文