r.circle
Creates a raster map containing concentric rings around a given point.
r.circle [-b] output=name coordinates=east,north [min=float] [max=float] [multiplier=float] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
r.circle output=name coordinates=east,north
grass.script.run_command("r.circle", output, coordinates, min=None, max=None, multiplier=None, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("r.circle", output="name", coordinates=east,north)
Parameters
output=name [required]
Name for output raster map
coordinates=east,north [required]
The coordinate of the center (east,north)
min=float
Minimum radius for ring/circle map (in meters)
max=float
Maximum radius for ring/circle map (in meters)
multiplier=float
Data value multiplier
-b
Generate binary raster map
Generate binary pattern only (useful for creating mask)
--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
Name for output raster map
Used as: output, raster, name
coordinates : tuple[float, float] | list[float] | str, required
The coordinate of the center (east,north)
Used as: input, coords, east,north
min : float, optional
Minimum radius for ring/circle map (in meters)
max : float, optional
Maximum radius for ring/circle map (in meters)
multiplier : float, optional
Data value multiplier
flags : str, optional
Allowed values: b
b
Generate binary raster map
Generate binary pattern only (useful for creating mask)
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.circle creates an output raster map centered on the x,y values specified with the coordinate parameter, out to the edge of the current region. The output cell values increase linearly from the specified center. The min and max parameters control the inner and outer output raster map radii, respectively.
The mult parameter can be used to multiply the output raster cells by a common factor. Note that this parameter does not affect the output raster position or size; only the z-values are changed with this parameter.
Binary-output raster maps (solid circles of one value) can be created with the -b flag. Raster maps so created can be used to create binary filters for use in i.ifft (inverse Fourier transformations; apply filter with r.mask).
EXAMPLES
Generate a raster circle at current map center with a radius of 300m and outwardly increasing raster values:
EASTCENTER=`g.region -c | awk ' /center easting:/ { print $3 }'`
NORTHCENTER=`g.region -c | awk ' /center northing:/ { print $3 }'`
r.circle output=circle coordinate=${EASTCENTER},${NORTHCENTER} max=300
Generate a binary raster ring around current map center with an inner radius of 500m and an outer radius of 1000m:
EASTCENTER=`g.region -c | awk ' /center easting:/ { print $3 }'`
NORTHCENTER=`g.region -c | awk ' /center northing:/ { print $3 }'`
r.circle -b output=circle coordinate=${EASTCENTER},${NORTHCENTER} min=500 max=1000
SEE ALSO
g.region, g.remove, g.rename, i.fft, i.ifft, r.mask
AUTHORS
Bill Brown, U.S. Army Construction Engineering Research Laboratory
Additional flag/min/max parameter by Markus Neteler, University of
Hannover
SOURCE CODE
Available at: r.circle source code
(history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f