Perimeter-area ratio

The perimeter-area ratio is an indicator of polygon shape complexity. Unlike some other shape parameters (e.g. shape complexity index), perimeter-area ratio does not standardize to a simple Euclidean shape. Although widely used for landscape analysis, perimeter-area ratio exhibits the undesirable property of polygon size dependence (Mcgarigal et al. 2002). That is, holding shape constant, an increase in polygon size will cause a decrease in the perimeter-area ratio. The perimeter-area ratio is the inverse of the compactness ratio.

If a raster image is input, the user must specify the name of the output raster file, which will be raster layer containing the input features assigned the perimeter-area ratio. The user may also optionally choose to output text data if a raster file is input. Raster-based perimeter estimation uses the accurate, anti-aliasing algorithm of Prashker (2009). Zero values in the input raster can be optionally treated as background values.

If a vector file (shapefile) is input, the output data will be displayed as a new field (P-A_RATIO) in the database file (.dbf). There is no need to specify an output raster file when a vector is input or the other two optional parameters.

See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "polygons.shp" # vector input
outputFile = "" # ignored for vector input
textOutput = "false" # also ignored
zerosAreBackground = "false" # also ignored
args = [inputFile, outputFile, textOutput, zerosAreBackground]
pluginHost.runPlugin("PerimeterAreaRatio", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "polygons.dep" // raster input
def outputFile = wd + "output.dep"
def textOutput = "true"
def zerosAreBackground = "true"
String[] args = [inputFile, outputFile, textOutput, zerosAreBackground]
pluginHost.runPlugin("PerimeterAreaRatio", args, False)

Credits:

References: