Search code examples
pythonbounding-boxpolygons

Find the area of a bounding polygon that encloses a set of points


I have a series of points on a plot of the sky. I want to find the area that these points occupy.

To do this I need to find the vertices of a polygon that encloses these points - convert the points to an equal-area projection and then work out the area.

I have all the code written apart from how to calculate the vertices of a polygon that enclose the points on the graph. What is the best way to do this?

enter image description here


Solution

  • I think what you're looking for is finding a convex hull for a given set of points. That doc desrcibes it pretty well:

    http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.spatial.ConvexHull.html