d.rast.num
Overlays cell category values on a raster map displayed in the active graphics frame.
d.rast.num [-af] map=name [text_color=name] [grid_color=name] [precision=integer] [font=string] [path=name] [charset=string] [--verbose] [--quiet] [--qq] [--ui]
Example:
d.rast.num map=name
grass.script.run_command("d.rast.num", map, text_color="black", grid_color="gray", precision=1, font=None, path=None, charset=None, flags=None, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("d.rast.num", map="name")
Parameters
map=name [required]
Name of raster map
text_color=name
Text color
Either a standard color name or R:G:B triplet
Default: black
grid_color=name
Grid color
Either a standard color name, R:G:B triplet, or "none"
Default: gray
precision=integer
Number of significant digits (floating point only)
Allowed values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Default: 1
font=string
Font name
path=name
Path to font file
charset=string
Text encoding (only applicable to TrueType fonts)
-a
Align grids with raster cells
-f
Get text color from cell color value
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
map : str, required
Name of raster map
Used as: input, raster, name
text_color : str, optional
Text color
Either a standard color name or R:G:B triplet
Used as: input, color, name
Default: black
grid_color : str, optional
Grid color
Either a standard color name, R:G:B triplet, or "none"
Used as: input, color, name
Default: gray
precision : int, optional
Number of significant digits (floating point only)
Allowed values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Default: 1
font : str, optional
Font name
path : str, optional
Path to font file
Used as: file, name
charset : str, optional
Text encoding (only applicable to TrueType fonts)
flags : str, optional
Allowed values: a, f
a
Align grids with raster cells
f
Get text color from cell color value
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
d.rast.num overlays cell category values onto a raster map layer displayed on the user's graphics monitor. Category values will be displayed in the text color given and scaled to fit within a single cell. A grid outlining each map cell will also be overlain in a user-specified color, unless it has been set to "none".
If no grid color is given the default will be used. If no map layer is specified, the program will use whatever raster map layer is currently displayed in the active frame on the graphics monitor.
If the -f flag is given the displayed number will take on the color of the base map in that cell.
NOTES
The user is advised to set the current region to a relatively small area (i.e., less than 100 rows by 100 columns); otherwise, the individual cells being displayed will be small and the category value associated with each will be difficult to see. No data cells are indicated with "Null".
EXAMPLE
Distance from the streams network (North Carolina sample dataset):
g.region raster=streams_derived -p
r.grow.distance input=streams_derived distance=dist_from_streams
d.rast.num dist_from_streams -a
Euclidean distance from the streams network in meters (detail, numbers
shown with d.rast.num)
SEE ALSO
d.frame, d.grid, d.rast, d.rast.arrow, d.rast.edit, g.region, r.slope.aspect
AUTHORS
Raghavan Srinivasan, and Chris Rewerts,
Agricultural Engineering, Purdue University
SOURCE CODE
Available at: d.rast.num source code
(history)
Latest change: Wednesday Feb 12 23:02:46 2025 in commit 9c11460