计算地球平面地图上两点之间的最短路径
如何绘制代表地球平面地图上两点之间最短距离的曲线?
当然,这条线不会是直线,因为地球是弯曲的。 (例如,两个机场之间的最短距离是弯曲的。)
编辑:感谢所有答案 - 抱歉我选择解决方案很慢:/
How do you draw the curve representing the shortest distance between 2 points on a flat map of the Earth?
Of course, the line would not be a straight line because the Earth is curved. (For example, the shortest distance between 2 airports is curved.)
EDIT: THanks for all the answers guys - sorry I was slow to choose solution :/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从航空处方集获得此类信息。
在这种情况下:
并且
I get this sort of information from the Aviation Formulary.
In this case:
And
要将地球表面两点之间的 3D 最短路径绘制到地球表面的 2D 地图上,您必须知道地球的 3D 表面如何投影到相关的 2D 地图上。如果您知道所使用的投影,则只需将其应用于 3D 最短路径即可将其投影到 2D 地图上。如果您不知道所使用的确切投影,但可以通过某种接口访问它(即输入 3D 表面坐标 -> 输出 2D 地图坐标),您可以沿 3D 表面路径采样点,生成它们对应的点通过所述界面映射点,然后用线段/贝塞尔曲线/等近似投影路径。通过投影的样本点。
To draw the 3D shortest path between two points on Earth's surface onto a 2D map of Earth's surface, you have to know how the 3D surface of Earth was projected onto the 2D map in question. If you know the projection used, you just need to apply it to the 3D shortest path to project it onto the 2D map. If you don't know the exact projection used, but have access to it through some sort of interface (ie. input 3D surface coords -> output 2D map coords), you could sample points along the 3D surface path, generate their corresponding map points through said interface, and then approximate the projected path with line segments/bezier curves/etc. through the projected sample points.