如何计算沿线串的 2 个点之间的距离?

问题描述 投票:0回答:0

我有 2 个地理数据框。一个包含点,另一个包含线。点在直线上。我想计算沿 linestring 的任意 2 个选定点之间的路径距离,而不是欧氏距离。我该怎么办?

  • 这里是 gdf1_points.

enter image description here

  • 这里是 gdf2_lines。 enter image description here
  • 和可视化。 enter image description here

我只知道 pointA.distance(pointB) 和 line.length,但都不行。

python gis geopandas shapely
© www.soinside.com 2019 - 2024. All rights reserved.