This tools estimates the area of each category, polygon, or patch in an input raster. The input raster must be categorical in data scale. Rasters with floating-point cell values are not good candidates for an area analysis. The user must specify whether the output is given in `grid cells` or `map units` (`units`). Map Units are physical units, e.g. if the rasters's scale is in metres, areas will report in square-metres. Notice that square-metres can be converted into hectares by dividing by 10,000 and into square-kilometres by dividing by 1,000,000. If the input raster is in geographic coordinates (i.e. latitude and longitude) a warning will be issued and areas will be estimated based on per-row calculated degree lengths.

The tool can be run with a raster output (`output`), a text output (`out_text`), or both. If niether outputs are specified, the tool will automatically output a raster named `area.tif`.

Zero values in the input raster may be excluded from the area analysis if the `zero_back` flag is used.

To calculate the area of vector polygons, use the polygon_area tool instead.

## See Also

polygon_area, raster_histogram

## Function Signature

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

## Project Links

WbW Homepage User Manual Support WbW