Home > Net >  How to find the area of a partially closed shape with discreate data points
How to find the area of a partially closed shape with discreate data points

Time:11-10

I tried to apply shapely, But even after reading the documentation, I wasn't really successful.

I tried for another answer.

Irregular shape plot

Edit: I solved it.

Just form a polygon using shapely and find the area.

p = Polygon(zip(test.Distance,test.Resistance))
p.area

CodePudding user response:

I just solved the problem:

Just form a polygon using shapely and find the area.

Shapely polygon function uses coordinates so I have used zip function:

from shapely.geometry import Polygon
p = Polygon(zip(test.Distance,test.Resistance))
p.area

  • Related