Python: find area of polygon from xyz coordinates

后端 未结 5 1151
你的背包
你的背包 2020-12-28 18:07

I\'m trying to use the shapely.geometry.Polygon module to find the area of polygons but it performs all calculations on the xy plane. This is fine

5条回答
  •  天涯浪人
    2020-12-28 18:41

    The area of a 2D polygon can be calculated using Numpy as a one-liner...

    poly_Area(vertices) = np.sum( [0.5, -0.5] * vertices * np.roll( np.roll(vertices, 1, axis=0), 1, axis=1) )
    

提交回复
热议问题