This tool can be used to measure the length of the perimeter of polygon features in a raster layer. The user must specify the name of the input raster file (`input`) and optionally an output raster (`output`), which is the raster layer containing the input features assigned the perimeter length. The user may also optionally choose to output text data (`out_text`). Raster-based perimeter estimation uses the accurate, anti-aliasing algorithm of Prashker (2009).

The input file must be of a categorical data type, containing discrete polygon features that have been assigned unique identifiers. Such rasters are often created by region-grouping (clump) a classified raster.

## Reference

Prashker, S. (2009) An anti-aliasing algorithm for calculating the perimeter of raster polygons. Geotec, Ottawa and Geomtics Atlantic, Wolfville, NS.

## See Also

raster_area, clump

## Function Signature

`def raster_perimeter(self, raster: Raster, units: str = "map units", zero_background: bool = False) -> Tuple[Raster, str]: ...`

## Project Links

WbW Homepage User Manual Support WbW