我想從勻稱的點創建一個多邊形。如何創建一個給定點頂點的多邊形?
from shapely import geometry
p1 = geometry.Point(0,0)
p2 = geometry.Point(1,0)
p3 = geometry.Point(1,1)
p4 = geometry.Point(0,1)
pointList = [p1, p2, p3, p4, p1]
poly = geometry.Polygon(pointList)
給了我一個錯誤類型TypeError: object of type 'Point' has no len()
如何創建勻稱Point
對象Polygon
?
搭載這個 - 是否有任何不錯的單行程序用於在Shapely對象上調用'bounds'的結果來生成Polygon? – kuanb