我找到了这段代码,但它需要第一个点和第二个点才能创建一条线。如何更改代码,使其只需第一个点、线的长度和角度即可工作?
from shapely.geometry import LineString
from shapely.geometry import Point
p = Point(5,5)
c = p.buffer(3).boundary
l = LineString([(0,0), (10, 10)])
i = c.intersection(l)
print i.geoms[0].coords[0]
(2.8786796564403576, 2.8786796564403576)
print i.geoms[1].coords[0]
(7.121320343559642, 7.121320343559642)
Fi
和距离L
计算第二个点的坐标:x2 = x1 + L * cos(Fi) y2 = y1 + L * sin(Fi)
。 - MBo