[GIS] Calculating roundness/compactness of polygon

algorithmpolygonvector

I am trying to find ways to quantitatively describe the shapes of various polygons. For my project, these polygons represent lakes, rivers, lagoons, and parks. So they can be almost any shape. One easy metric is to calculate perimeter vs. area, which is at best an only slightly useful metric. But I would also very much like to be able to say something about the 'roundness' of a polygon. Or how 'compact' the shape is on a map.

The only way I can think of doing this easily is to calculate the area of each polygon in relation to a bounding box for that polygon (which I already have). But this seems like a poor solution.

So now I am thinking of something more like this – take the centroid of the polygon, add on a series of buffers of increasing areas (say 50%, 100%, 150%), then compare how much overlap there is between each buffer and the original polygon. A perfect circle will have perfect overlap at 100%, and I can use the 50% and 150% buffers to judge how much and in what way each polygon differs.

But even that feels cumbersome, and like a poor workaround for what somebody else has probably already figured out far better.

For reference, at a minimum I will need to be able to look at the resulting indices for the shape of various polygons, and be able to make an educated guess as to their source (River? Reservoir with dendritic shape? Lake/Lagoon? Park?)

Best Answer

The compactness of an object can be measured using the Polsby-Popper test by determining the Polsby-Popper (PP) score.

The PP score is determined by: multiplying the polygon's area by 4pi and dividing by the perimeter squared. Using this, a circle will have a score of 1 and any other geometric shape has a smaller ratio.

disc :(4*PI)* PI*R² / 4PI²R²= 1

square : (4*PI) * C² / 16 * C² = PI/4 ~=0.78

Another usefull index could be the lenght/width of the smallest enclosing rectangle (see the minimum bounding geometry tool). But in this case the square and the circle are alike and concavity is ignored.

As a last recommendation, if you work with perimeter, it is usefull to "smooth" your object before computing the indices, in order to avoid "fractal" effect (especially if your polygons come from raster to polygon conversion)