How to create a shapely Polygon from a list of shapely Points?

前端 未结 4 726
故里飘歌
故里飘歌 2020-12-17 08:34

I want to create a polygon from shapely points.

from shapely import geometry
p1 = geometry.Point(0,0)
p2 = geometry.Point(1,0)
p3 = geometry.Point(1,1)
p4 =          


        
4条回答
  •  失恋的感觉
    2020-12-17 09:26

    The Polygon constructor doesn't expect a list of Point objects but a list of point coordinates.

    See https://shapely.readthedocs.io/en/latest/manual.html#polygons

提交回复
热议问题