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, --quiet and --ui are 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 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 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.frame
  • d.grid
  • d.rast
  • d.rast.arrow
  • d.rast.edit
  • g.region
  • r.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