r.mask.status(1grass)

πŸ“¦ version 8.5.0, in alpine 3.24, ubuntu stonking

πŸ’– r.mask.status β€” the vibe check for your raster mask πŸ’–

okay bestie, first things first: this is the manual page for r.mask.status from the GRASS User's Manual. It's a tiny tool with a big job and honestly? she ate. ✨

✨ NAME ✨

r.mask.status β€” reports presence or absence of a raster mask πŸŽ€

Basically: she gives you info about whether a 2D raster mask is there, as text output or as a return code. That's it. That's the whole gig. no cap.


πŸ¦‹ KEYWORDS πŸ¦‹

raster, mask, reclassification


🌸 SYNOPSIS 🌸

r.mask.status
r.mask.status --help
r.mask.status [-t]  [format=string]   [--help]  [--verbose]  [--quiet]
[--ui]

πŸŽ€ Flags

  • -t β€” return code 0 when the mask is present, 1 otherwise. She behaves like the test utility: 0 means true, 1 means false, and there's no output at all. silent. mysterious. iconic.
  • --help β€” prints the usage summary, aka the little cheat sheet πŸ’…
  • --verbose β€” verbose module output (she tells you more)
  • --quiet β€” quiet module output (she tells you less)
  • --ui β€” forces the GUI dialog to launch

πŸ“ Parameters

  • format=string β€” the format she uses for reporting
    • Options: plain, json, shell, yaml
    • Default: plain
    • plain: plain text output
    • json: JSON (JavaScript Object Notation)
    • shell: shell script style output
    • yaml: YAML (human-friendly data serialization language)

πŸ’œ DESCRIPTION πŸ’œ

So r.mask.status reports info about the 2D raster mask and its status. The tool tells you whether the mask is present or not. And for both an active and an inactive mask, she reports the full name of the raster (that's the name including the mapset) which represents β€” or would represent β€” the mask. 😌

She can also report the full name of the underlying raster if the mask is reclassified from another raster. obsessed.

What you can use her for, fr fr:

  • checking if the mask is currently set β€” that's the present boolean in JSON
  • seeing what raster name is used to represent the mask β€” that's the name string in JSON
  • seeing whether the raster is reclassified from another one β€” that's the is_reclass_of string, or null, in JSON

YAML and shell script style outputs follow the JSON output when possible. The plain text format outputs multi-line, human-readable info in natural language, like she's just texting you the news. πŸ’¬

With the -t flag, no output is printed at all β€” instead a return code indicates presence or absence. The convention is the same as the POSIX test utility, so r.mask.status returns 0 when the mask is present and 1 otherwise. clean. simple. periodt.


🌈 EXAMPLES 🌈

✨ Generate JSON output

To generate JSON output in Bash, use the format option:

r.mask.status format=json

In Python, use:

import grass.script as gs
gs.parse_command("r.mask.status", format="json")

This returns a dictionary with keys present, full_name, and is_reclass_of. slay πŸ’…

πŸ’€ Use as the test utility

The POSIX test utility uses return code 0 to indicate presence and 1 to indicate absence of a file, so testing existence of a file with test -f gives return code 0 when the file exists. r.mask.status can be used the same way with the -t flag:

r.mask.status -t

In a Bash script:

# Bash
if r.mask.status -t; then
    echo "Masking is active"
else
    echo "Masking is not active"
fi

see? she's basically your emotional support exit code 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

r.mask, g.region

go read those too bestie, they're in the group chat.


🌟 AUTHORS 🌟

Vaclav Petras, NC State University, Center for Geospatial Analytics

(he wrote this. respect. πŸ™Œ)


🧚 SOURCE CODE 🧚

Available at: r.mask.status 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 whole page, bestie πŸ’– no notes, she's perfect, go check your mask ✨

okay bye ily, this was GRASS 8.5.0's r.mask.status(1grass) manual, dated Thursday Oct 02 14:39:13 2025 β€” mwah πŸ’…πŸŽ€

πŸ“¦ where this page comes from