给定纬度、经度和航向,如何确定距该点 x 米的纬度/经度?
我有一系列的纬度/经度,代表某个物体的中心。我需要在中心两侧 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
基本计算在这个类似问题的答案中:在知道起点和距离的情况下计算第二个点。计算与主航向垂直且距您想要的距离的两个航向的点。
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.
查看:方位和距离的核心位置扩展
包含这些扩展和两个点在第一行上,您应该能够获得方位,添加/减去 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: