d.rast.num(1)

✨ NAME ✨

okay bestie, gather round πŸ’– this is d.rast.num, live from the GRASS GIS User's Manual (that's the d.rast.num(1) page, if you're keeping receipts). What does it do? It overlays cell category values on a raster map displayed in the active graphics frame. That's it, that's the whole vibe. πŸ‘‘


🌸 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. cute alignment, slay ✨
  • -f β€” Get text color from cell color value. the text matches the cell, no cap πŸ’…
  • --help β€” Print usage summary
  • --verbose β€” Verbose module output (she's chatty, we love her)
  • --quiet β€” Quiet module output (she's mysterious, also iconic)
  • --ui β€” Force launching GUI dialog

πŸ“ Parameters πŸ“

  • map=name [required] β€” Name of raster map. yes this one is mandatory, you cannot skip it bestie 😭
  • 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). Options: 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)

πŸ’œ DESCRIPTION πŸ’œ

So the way that d.rast.num works is it overlays cell category values onto a raster map layer displayed on the user's graphics monitor. πŸ–₯️✨ The category values show up in the text color you gave it, and they get scaled to fit inside a single cell. A grid outlining each map cell also gets overlain, in a user-specified color β€” unless you set it to "none", in which case no grid, no problem. 🚫

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. she's flexible like that πŸ’…

And if the -f flag is given, the displayed number takes on the color of the base map in that cell. matchy matchy, obsessed 🫢


🌈 NOTES 🌈

Bestie, real talk: 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. πŸ‘€ tiny numbers = no vibe.

No data cells are indicated with "Null". just so you know πŸ’€

⭐ 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

(go read those too, they're the friend group πŸ«‚)


πŸ‘‘ AUTHORS πŸ‘‘

Raghavan Srinivasan, and Chris Rewerts, Agricultural Engineering, Purdue University


🌟 SOURCE CODE 🌟

Available at: d.rast.num source code (history)

Accessed: Saturday Jan 17 05:40:36 2026

Main index | Display index | Topics index | Keywords index | Graphical index | Full index


Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual

and that's the whole page, bestie β€” GRASS 8.4.2, d.rast.num(1), signed, sealed, slayed πŸ’…βœ¨ periodt πŸŽ€

πŸ“¦ where this page comes from