d.rast.num(1grass)
π d.rast.num β the GRASS User's Manual glow-up π
okay bestie, this is the manual page for d.rast.num (that's d.rast.num(1grass) if you wanna be formal, which, slay, we don't). It lives in the GRASS User's Manual and honestly? It's giving legend energy. Let's get into it π«Ά
β¨ NAME β¨
d.rast.num β overlays cell category values on a raster map displayed in the active graphics frame. literally labels your map. iconic behavior π
π·οΈ KEYWORDS π·οΈ
display, map annotations, raster
π SYNOPSIS π
d.rast.num
d.rast.num --help
d.rast.num [-af] map=name [text_color=name] [grid_color=name]
[precision=integer] [font=string] [path=name] [charset=string]
[--help] [--verbose] [--quiet] [--ui]
π Flags π
-aβ Align grids with raster cells. no cap, this makes the grid line up with the actual cells instead of vibing off on its own πΈ-fβ Get text color from cell color value. the numbers steal their fit from the cell they're sitting in π--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
bestie reminder:--help,--verbose,--quietand--uiare the standard GRASS flag besties, they show up everywhere, iykyk β¨
π¦ Parameters π¦
map=name[required] β Name of raster map. yes queen, this one is mandatory, you cannot skip it πtext_color=nameβ Text color. Either a standard color name orR:G:Btriplet. Default:blackgrid_color=nameβ Grid color. Either a standard color name,R:G:Btriplet, or"none". Default:grayprecision=integerβ Number of significant digits (floating point only). Options:0,1,2,3,4,5,6,7,8,9. Default:1font=stringβ Font namepath=nameβ Path to font filecharset=stringβ Text encoding (only applicable to TrueType fonts)
π DESCRIPTION π
So d.rast.num overlays cell category values onto a raster map layer that's already displayed on your graphics monitor. The category values show up in whatever text color you gave it, scaled to fit inside a single cell. A grid outlining each map cell also gets overlain, in a color you specify β unless you set that color to "none", in which case, no grid, we're minimal now π§
If you don't give a grid color, the default one gets used. And if you don't specify a map layer at all, the program just uses whatever raster map layer is currently displayed in the active frame on the graphics monitor. it reads the room, honestly π
If you pass the -f flag, the displayed number takes on the color of the base map in that cell. matchy matchy, obsessed β¨
π NOTES π
The user is advised to set the current region to a relatively small area β like, less than 100 rows by 100 columns. otherwise the individual cells being displayed end up tiny and the category value for each one becomes genuinely hard to see π
No data cells are indicated with "Null". periodt, that's the marker π
πΈ 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). look at those numbers pop off π₯
π SEE ALSO π
d.framed.gridd.rastd.rast.arrowd.rast.editg.regionr.slope.aspect
go read those too, the whole friend group is serving π
π AUTHORS π
Raghavan Srinivasan, and Chris Rewerts, Agricultural Engineering, Purdue University
absolute legends, we stan π
πΎ SOURCE CODE πΎ
Available at: d.rast.num source code (history)
Latest change: Thursday May 08 14:17:52 2025 in commit: 3caa352f78f86a51ca463a6f1ba7ffe3db9771df
Main index | Display index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
okay that's the whole page, bestie, we ate and left no crumbs ππ
and one last cute sign-off: this whole glow-up is brought to you by GRASS 8.5.0 β the d.rast.num(1grass) manual page, made β¨iconicβ¨ as of that Thursday May 08 14:17:52 2025 commit, 3caa352f78f86a51ca463a6f1ba7ffe3db9771df. bye pookie, go label some rasters π¦π
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms