GRASS logo

NAME

r.cell.area - Calculates the area of each raster cell for the computational region

KEYWORDS

raster, geometry

SYNOPSIS

r.cell.area
r.cell.area --help
r.cell.area output=name units=string [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

output=name [required]
Output raster of cell areas
Name of output raster map containing cell areas
units=string [required]
Output units
Units for output cell areas
Options: m2, km2, ha, acres, mi2
m2: Square meters
km2: Square kilometers
ha: Hectares
acres: Acres
mi2: Square miles

Table of contents

DESCRIPTION

r.cell.area is deprecated. Use the built-in area() function in r.mapcalc instead (available since GRASS 7.4). It provides an ellipsoidal cell-area calculation and requires no extra module.

r.cell.area computes the area of each raster cell in the current computational region and writes the result to a new raster map. It is now a thin wrapper around the area() function in r.mapcalc and emits a deprecation warning on every run.

NOTES

The area() function in r.mapcalc returns cell area in square metres using an ellipsoidal model. Multiply by a constant to obtain other units:

r.cell.area unitsEquivalent r.mapcalc expression
m2 r.mapcalc "output = area()"
km2 r.mapcalc "output = area() * 1e-6"
ha r.mapcalc "output = area() * 1e-4"
acres r.mapcalc "output = area() / 4046.8564224"
mi2 r.mapcalc "output = area() / 2589988.110336"

EXAMPLES

Compute cell area in square metres (recommended, no module needed):

r.mapcalc "cell_area_m2 = area()"

Compute cell area in hectares:

r.mapcalc "cell_area_ha = area() * 1e-4"

Using r.cell.area (deprecated, emits a warning):

r.cell.area output=cell_area units=ha

SEE ALSO

r.mapcalc

AUTHOR

Andrew D. Wickert

SOURCE CODE

Available at: r.cell.area source code (history)

Latest change: Saturday Jun 13 12:23:25 2026 in commit: 90424a70928b64fabea462b85f38e3ef308af8cd


Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual