其他分享
首页 > 其他分享> > 点打断线【GIS】【shapely】

点打断线【GIS】【shapely】

作者:互联网

from shapely.geometry import LineString, Point
from shapely.ops import snap, split
if __name__ == '__main__':
    arr = [[0, 0], [10, 0]]
    brr = [5, 0.01]
    ls = LineString(arr)
    pt = Point(brr)
    geom = snap(ls, pt, 0.5)
    part1, part2 = split(geom, pt)

  

标签:__,arr,GIS,shapely,pt,brr,geom,打断
来源: https://www.cnblogs.com/ddzhen/p/15163297.html