使用坐标(纬度和经度)时如何计算线与点之间的垂直距离

How to calculate perpendicular distance between a line and a point when using coordinates (latitude & longitude)

我想计算线与点之间的垂直距离。 LinePointA(纬度,经度)-(48.294483,11.568453) LinePointB(纬度,经度)-(48.283479,11.838929) PointC(纬度,经度)-(48.561846,11.733314) 这里AB是线,C是点。 根据 google 地图,预计距离为 59.36 公里 提前致谢。

您可以尝试 barefoot -- 开源 Java 地球坐标几何运算库。

这是您问题的解决方案 -- https://github.com/bmwcarit/barefoot#spatial-search-and-operations

如果您想更深入地了解数学,请查看this