r.mask.status(1grass)
π 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 code0when the mask is present,1otherwise. She behaves like thetestutility:0means true,1means 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 outputjson: JSON (JavaScript Object Notation)shell: shell script style outputyaml: YAML (human-friendly data serialization language)
- Options:
π 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
presentboolean in JSON - seeing what raster name is used to represent the mask β that's the
namestring in JSON - seeing whether the raster is reclassified from another one β that's the
is_reclass_ofstring, ornull, 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
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms