Skip to contents

Computes the true (geodesic, latitude-corrected) area of each MapBiomas pixel class inside a cropped/masked raster. Works for rasters in geographic CRS, where pixel area varies with latitude, by using terra::cellSize().

Usage

mb_class_areas_raster(r)

Arguments

r

A terra SpatRaster of MapBiomas codes (e.g. from mb_raster_local).

Value

A data.frame with columns code and area_km2.