r.buffer.lowmem
Creates a raster map showing buffer zones surrounding cells that contain non-NULL category values.
This is the low-memory alternative to the classic r.buffer module.
r.buffer.lowmem [-z] input=name output=name distances=float [,float,...] [units=string] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
r.buffer.lowmem input=name output=name distances=float
grass.script.run_command("r.buffer.lowmem", input, output, distances, units="meters", flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("r.buffer.lowmem", input="name", output="name", distances=float)
Parameters
input=name [required]
Name of input raster map
output=name [required]
Name for output raster map
distances=float [,float,...] [required]
Distance zone(s)
units=string
Units of distance
Allowed values: meters, kilometers, feet, miles, nautmiles
Default: meters
-z
Ignore zero (0) data cells instead of NULL cells
--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
input : str, required
Name of input raster map
Used as: input, raster, name
output : str, required
Name for output raster map
Used as: output, raster, name
distances : float | list[float] | str, required
Distance zone(s)
units : str, optional
Units of distance
Allowed values: meters, kilometers, feet, miles, nautmiles
Default: meters
flags : str, optional
Allowed values: z
z
Ignore zero (0) data cells instead of NULL cells
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.buffer.lowmem creates a new raster map showing buffer (a.k.a. "distance" or "proximity") zones around all cells that contain non-NULL category values in an existing raster map. The distances of buffer zones from cells with non-zero category values are user-chosen.
This is the low-memory alternative to the classic r.buffer module. It is much slower than the classic version, but will run on massive raster maps without using a lot of RAM. If your raster map is larger than 32000x32000 cells on a system with 1 GB of RAM, or larger than 90000x90000 cells on a system with 8 GB of RAM, consider using this module.
For more info see manual of r.buffer.
EXAMPLE
In the following example, the buffer zones would be (in the default units of meters): 0-100, 101-200, 201-300, 301-400 and 401-500.
r.buffer.lowmem input=roads output=roads.buf distances=100,200,300,400,500
Result:
r.category input=roads.buf
1 distances calculated from these locations
2 0-100 meters
3 100-200 meters
4 200-300 meters
5 300-400 meters
6 400-500 meters
SEE ALSO
g.region, r.buffer, r.cost, r.grow.distance, r.mapcalc, r.reclass, v.buffer
AUTHORS
Michael Shapiro, U.S. Army Construction Engineering Research
Laboratory
James Westervelt, U.S. Army Construction Engineering Research
Laboratory
Low-memory Python version by Glynn Clements
SOURCE CODE
Available at: r.buffer.lowmem source code
(history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f