点打断线【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)

  

上一篇:r学习笔记--散点图


下一篇:shp的基本操作