Skip to content

r.cell.area

Calculate cell sizes within the computational region

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

Example:

r.cell.area output=name units=string

grass.script.run_command("r.cell.area", output, units, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.cell.area", output="name", units="string")

Parameters

output=name [required]
    Output grid of cell sizes
units=string [required]
    Units for output areas
    Allowed values: m2, km2
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

output : str, required
    Output grid of cell sizes
    Used as: output, raster, name
units : str, required
    Units for output areas
    Allowed values: m2, km2
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

r.cell.area uses the current computational region to compute the area of each raster cell. It can do so on a projected coordinate system or on a geographic coordinate system; the latter is accomplished via the latitude of the cell's midpoint. This approximation can generate \~1% error with coarse lat/lon cells near the poles.

NOTES

Output units can be either square meters or square kilometers. This module is useful for determining the flow accumulation area to weight flow accumulation algorithms by rainfall and/or on lat/lon grids.

SEE ALSO

r.mapcalc

AUTHOR

Andrew D. Wickert

SOURCE CODE

Available at: r.cell.area source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819