I am trying to find the area within a Contour line. I have 523 points in X,Y,Z-axis which form a closed irregular shape with these points. Z is being constant throughout the shape...... few points are array([[-33.328, -89.917, 171. ],[-33.212, -90.032, 171. ], [-31.824, -90.032, 171. ], [-34.022, -89.685, 171. ], -33.907, -89.801, 171. ], [-33.444, -89.801, 171. ]]) I do not have an equation. Does anyone have any idea how to find out the area in Python?
Asked
Active
Viewed 147 times
0
-
How precise a result do you need? You could imagine your points are pixels, and count the number of pixels inside the contour. – Stef Oct 22 '20 at 15:46
-
it can be approximate and dont need an exact area – S kolli Oct 22 '20 at 15:49
1 Answers
-1
The question is kind of duplicated.
In one answer inside this question the second part tells how to compute area of polygon by function area_of_polygon(x, y)
Where x and y are x and y coordinates of all points in the same order. Assuming that your array is points you can get this by:
x = points[:, 0]
y = points[:, 1]

MakowToms
- 19
- 3