r.rescale.eq(1grass)

πŸ’… r.rescale.eq β€” the manual page, but make it cute

okay bestie, gather round, we're talking about r.rescale.eq from the GRASS User's Manual. it's a lil raster tool, and honestly? it eats. let's get into it πŸŽ€


✨ NAME ✨

r.rescale.eq β€” rescales histogram equalized the range of category values in a raster map layer. yeah girl, that's the whole job. that's the gig. 🌈


πŸ”‘ KEYWORDS πŸ”‘

raster, rescale β€” that's the vibe check, that's the tags, periodt. πŸ’…


πŸ“œ SYNOPSIS πŸ“œ

like here's how you actually summon it, no cap:

r.rescale.eq
r.rescale.eq --help
r.rescale.eq input=name  [from=min,max]  output=name to=min,max
[title=phrase]   [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

🚩 Flags 🚩

  • --overwrite β€” lets your output files just bulldoze whatever's already sitting there with that name. allow output files to overwrite existing files, she said πŸ’€
  • --help β€” prints the usage summary, aka the lil cheat sheet when you forgot how this works
  • --verbose β€” verbose module output, she's chatty, she's telling you everything
  • --quiet β€” quiet module output, she's not talking, she's mysterious πŸ¦‹
  • --ui β€” force launching GUI dialog. yes, actual popup window energy, main character move ✨

πŸŽ€ Parameters πŸŽ€

  • input=name [required] β€” the name of the raster map to be rescaled. you GOTTA give her this one, it's required, no skipping 🫢
  • from=min,max β€” the input data range to be rescaled (default: full range of input map). optional but iconic
  • output=name [required] β€” the resulting raster map name. also required, also non-negotiable πŸ‘‘
  • to=min,max [required] β€” the output data range. required, yes, we need a destination bestie
  • title=phrase β€” title for new raster map. give your baby a name 🧚

πŸ’– DESCRIPTION πŸ’–

so the r.rescale.eq program rescales the range of category values appearing in a raster map layer β€” with equalized histogram. yes, equalized, that's the whole point, that's her special sauce 🌸

a new raster map layer gets generated, plus an appropriate category file AND a color table, both based upon the original raster map layer. and the category labels? they reflect the original category values that produced each category. cute, right? it's giving "traceable lineage" πŸ’…

this command is useful for producing representations with a reduced number of categories from a raster map layer that has a large range of category values β€” like, say, elevation. (elevation really said "I contain multitudes" 😭)

and here's the tea: rescaled map layers are appropriate for use in such GRASS commands as r.stats, r.report, and r.coin. so go forth, use them there πŸ¦‹


🌟 EXAMPLE 🌟

want to rescale an elevation raster map layer with category values ranging from 1090 meters to 1800 meters into the range 0-255? bestie, the following command line could be used. and remember β€” without the from parameter, the full value range will be used:

r.rescale.eq input=elevation from=1090,1800 output=elevation.255 to=0,255

look at her go. immaculate. πŸ”₯


πŸ“ NOTES πŸ“

okay this part matters, listen up πŸŽ€

category values that fall beyond the input range will become NULL. yep. gone. poof. so this actually allows you to select a subset of the full category value range for rescaling if you want β€” which is lowkey a feature, highkey something you need to know about.

and this also means the user should know the category value range for the input raster map layer. like, know your data, bestie, it's self-care 🫢

the user can request the r.rescale.eq program to determine this range, OR can obtain it using the r.describe or r.info command. your choice, both valid, no wrong answers πŸ’œ

and if the category value range IS determined using r.rescale.eq? then the input raster map layer is examined, and the minimum and maximum non-NULL category values are selected as the input range. she does the math herself. independent queen πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

go read these too, they're all in the group chat:

r.coin, r.describe, r.info, r.mapcalc, r.reclass, r.rescale, r.report, r.resample, r.stats


✍️ AUTHOR ✍️

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory β€” thank you for your service, king 🫑


πŸ’» SOURCE CODE πŸ’»

available at: r.rescale.eq source code (history)

latest change: Wednesday May 21 09:11:03 2025 in commit: 45102055f4f205276ad5f85b5775b70c6583a26f

main index | raster index | topics index | keywords index | graphical index | full index


and that's the whole page, bestie πŸŽ€ ok so to send you off: this came from the GRASS User's Manual, version GRASS 8.5.0, and the copyright belongs to Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual. slay, go rescale something, and remember β€” NULL values are forever πŸ’€βœ¨

πŸ“¦ where this page comes from