r.describe(1grass)

πŸ‘‘ r.describe β€” GRASS User's Manual

okay bestie, welcome to the manual page for r.describe, from the GRASS 1grass manual. sit down, grab a lil snack πŸ“, and let's talk about your new fave raster metadata tool. it is giving lowkey essential, no cap. πŸ’…


🌸 NAME

r.describe β€” prints a terse list of category values found in a raster map layer. that's the whole job. it's concise, it's iconic, it ate. ✨

🏷️ KEYWORDS

raster, metadata

✨ SYNOPSIS

r.describe
r.describe --help
r.describe [-1rndi] map=name  [null_value=string]   [nsteps=integer]
format=name  [--help]  [--verbose]  [--quiet]  [--ui]

🚩 Flags:

  • -1 β€” spits the output out one value per line, no squishing ✨
  • -r β€” only print the range of the data, that's it, that's all
  • -n β€” suppress reporting of any NULLs, they're not invited 🫢
  • -d β€” use the current region
  • -i β€” read a floating-point map as an integer
  • --help β€” print usage summary
  • --verbose β€” verbose module output, chatty mode fr fr
  • --quiet β€” quiet module output, silent mode πŸ’€
  • --ui β€” force launching the GUI dialog

πŸŽ€ Parameters:

  • map=name [required] β€” name of the raster map. yes it's required, you literally cannot do this without it bestie
  • null_value=string β€” string representing the NULL value. Default: *
  • nsteps=integer β€” number of quantization steps. Default: 255
  • format=name [required] β€” output format. Options: plain, json. Default: plain
    • plain: plain text output, the classic
    • json: JSON (JavaScript Object Notation), for when you're feeding it to something else 🌈

πŸ’– DESCRIPTION

r.describe prints a terse listing of category values found in a user-specified raster map layer. terse!! it's not gonna write you an essay, it's gonna give you the receipts. 🧾

now here's the spicy part: r.describe ignores the current geographic region and mask, and reads the full extent of the input raster map. and this is genuinely useful, not just chaos for the sake of chaos β€” it's exactly what you want if you're planning to reclassify or rescale the data, because r.reclass and r.rescale also ignore the current geographic region and mask. see? everything is connected. iykyk. πŸ¦‹

the nv parameter sets the string used to represent NULL values in the module output; the default is *. (yes, that character is literally an asterisk. star behavior honestly ⭐)

the nsteps parameter sets the number of quantisation steps to divide into the input raster map.


πŸ“ NOTES

πŸ”₯ FLAGS

if you pick the -r flag, you get a range of category values found in the raster map layer printed out. that range gets divided into three lil groups: negative, positive, and zero.

  • if negative values show up, the minimum and maximum negative values get printed
  • if positive values show up, the minimum and maximum positive values get printed
  • if zero shows up, that gets indicated

and here's the slay: the range report will generally run faster than the full list (which is the default output). speed. ⚑

the -d flag can be used to force r.describe to respect the current region extents when reporting raster map categories. the default behavior is to read the full extent of the input raster map. so -d is your "actually, listen to the region" button. πŸ‘‘

if the -1 flag is specified, the output appears with one category value/range per line. one. per. line. πŸ’…

the -n flag suppresses the reporting of NULL values. bye felicia πŸ‘‹


🌈 EXAMPLES

the following examples are from the Spearfish60 sample dataset. not me being obsessed with a sample dataset 😭

r.describe landcover.30m
* 11 21-23 31 32 41-43 51 71 81-83 85 91 92
r.describe -r landcover.30m
11 thru 92
*
r.describe -n landcover.30m
11 21-23 31 32 41-43 51 71 81-83 85 91 92
r.describe -1 geology
*
1
2
3
4
5
6
7
8
9

🫢 SEE ALSO

  • g.region, r.mask, r.reclass, r.report, r.rescale, r.stats, r.univar

like, the whole friend group. go say hi. πŸ’œ


✨ AUTHOR

Michael Shapiro, U.S. Army Construction Engineering Research Laboratory


πŸ’Ύ SOURCE CODE

Available at: r.describe source code (history)

Latest change: Thursday Oct 02 14:39:13 2025 in commit: 1850489bf42c72d8dcfe2e4db1738441b4a7dc43

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the tea, bestie πŸ’– this whole page lives in the GRASS 8.5.0 manual, and the version stamp at the bottom is GRASS 8.5.0 β€” from the GRASS Development Team, Β© 2003-2026, one and only πŸŒΈβœ¨πŸ‘‘

πŸ“¦ where this page comes from