Skip to content

Commit

Permalink
doc: Use lowercase for 2D raster mask
Browse files Browse the repository at this point in the history
On many places (more than covered here), 2D raster mask is called MASK conflating the concept (mask) and the implementation (MASK raster). Users using the r.mask tool may not interact with the underlying raster directly, so there is no reason to use MASK over mask.

This is leaving many places as they are with MASK. Some will be better revisited with or after OSGeo#2390 and OSGeo#2392 when a more comprehensive solution is available.

This fixes and keeps in sync wording r.null and r.external, and moves r.circle comment documenting the interface to a flag description.
  • Loading branch information
wenzeslaus committed Sep 27, 2024
1 parent bcb2938 commit 51f32de
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion display/d.histogram/d.histogram.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>DESCRIPTION</h2>
<h2>NOTES</h2>

<em>d.histogram</em> respects the current geographic region settings
and the current MASK (if one exists).
and the current raster mask (if mask is active).

<p><em>d.histogram</em> uses the colors in the map's color look-up table
(i.e., the map's <em>colr</em> or <em>colr2</em> file).
Expand Down
6 changes: 4 additions & 2 deletions raster/r.circle/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ int main(int argc, char *argv[])

flag = G_define_flag();
flag->key = 'b';
flag->description = _("Generate binary raster map");
flag->label = _("Generate binary raster map");
flag->description =
_("Generate binary pattern only (useful for creating mask)");

if (G_parser(argc, argv))
exit(EXIT_FAILURE);
Expand Down Expand Up @@ -114,7 +116,7 @@ int main(int argc, char *argv[])
"using the binary flag"));

if (flag->answer)
binary = 1; /* generate binary pattern only, useful for MASK */
binary = 1;
else
binary = 0;

Expand Down
8 changes: 5 additions & 3 deletions raster/r.external/r.external.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ <h2>NULL data handling</h2>
NULL cells are those whose value matches the value reported by the
GDALGetRasterNoDataValue() function.

To apply the GDAL-linked the user need to either create a MASK (e.g.
with <em>r.mask</em>) and then "apply" it using e.g. <em>r.resample</em>,
<p>
To introduce additional NULL values to a computation based on a GDAL-linked
raster, the user need to either create a mask with with <em>r.mask</em> and
then "apply" it using e.g. <em>r.resample</em> or <em>r.mapcalc</em>,
or use <em>r.mapcalc</em> to create a copy with the appropriate categories
changed to NULL (if() condition).
changed to NULL (<code>if()</code> condition).

<h2>EXAMPLES</h2>

Expand Down
10 changes: 6 additions & 4 deletions raster/r.null/r.null.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ <h3>External maps</h3>
From the <a href="r.external.html">r.external</a> documentation: GDAL-linked
(<em>r.external</em>) maps do not have or use a NULL bitmap, hence <em>r.null</em> cannot
manipulate them directly. Here NULL cells are those whose value matches
the value reported by the GDALGetRasterNoDataValue() function. To apply the
GDAL-linked the user need to either create a MASK (e.g. with <em>r.mask</em>) and
then "apply" it using e.g. <em>r.resample</em>, or use <em>r.mapcalc</em> to create a copy
with the appropriate categories changed to NULL (<tt>if()</tt> condition).
the value reported by the GDALGetRasterNoDataValue() function.
To introduce additional NULL values to a computation based on a GDAL-linked
raster, the user need to either create a mask with with <em>r.mask</em> and
then "apply" it using e.g. <em>r.resample</em> or <em>r.mapcalc</em>,
or use <em>r.mapcalc</em> to create a copy with the appropriate categories
changed to NULL (<code>if()</code> condition).

<h2>EXAMPLES</h2>

Expand Down
4 changes: 3 additions & 1 deletion raster/r.stream.extract/r.stream.extract.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ <h3>Defining a region of interest</h3>

The stream extraction procedure can be restricted to a certain region of
interest, e.g. a subbasin, by setting the computational region with
<em><a href="g.region.html">g.region</a></em> and/or creating a MASK. Such region of interest should
<em><a href="g.region.html">g.region</a></em> and/or creating a mask
with <em><a href="r.mask.html">r.mask</a></em>.
Such region of interest should
be a complete catchment area, complete in the sense that the complete
area upstream of an outlet point is included and buffered with at least
one cell.
Expand Down
2 changes: 1 addition & 1 deletion raster3d/raster3dintro.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h4>Conversion from 2D raster maps</h4>
2D rasters are considered as slices in this case and
merged into one 3D raster map (<a href="r.to.rast3.html">r.to.rast3</a>).

<h3>3D region settings and 3D MASK</h3>
<h3>3D region settings and 3D mask</h3>

GRASS GIS 3D raster map processing is always performed in the current 3D region
settings (see <a href="g.region.html">g.region</a>, <em>-p3</em> flags), i.e.
Expand Down
2 changes: 1 addition & 1 deletion scripts/r.out.xyz/r.out.xyz.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>DESCRIPTION</h2>
<h2>NOTES</h2>

This module will by default not export x,y coordinates for raster cells
containing a NULL value. This includes cells masked by a raster MASK.
containing a NULL value. This includes cells masked by a raster mask.
Using the flag <b>-i</b> also these raster cells will be included in the
exported data.
<p>
Expand Down

0 comments on commit 51f32de

Please sign in to comment.