[GRASS-SVN] r51626 - grass/branches/develbranch_6/scripts/r.mask

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 15 15:48:39 EDT 2012


Author: hamish
Date: 2012-05-15 12:48:38 -0700 (Tue, 15 May 2012)
New Revision: 51626

Modified:
   grass/branches/develbranch_6/scripts/r.mask/description.html
   grass/branches/develbranch_6/scripts/r.mask/r.mask
Log:
GRASS_OVERWRITE=0 means protect maps, '! -z' is '-n'

Modified: grass/branches/develbranch_6/scripts/r.mask/description.html
===================================================================
--- grass/branches/develbranch_6/scripts/r.mask/description.html	2012-05-15 13:47:44 UTC (rev 51625)
+++ grass/branches/develbranch_6/scripts/r.mask/description.html	2012-05-15 19:48:38 UTC (rev 51626)
@@ -25,7 +25,7 @@
 
 <p>
 To restore raster operations to normal (i.e., all cells of the current region),
-remove the MASK file by setting the <b>-r</b> remove MASK flag. In this case, a
+remove the MASK map by setting the <b>-r</b> remove MASK flag. In this case, a
 dummy value must also be given for the input parameter.
 A MASK also can be removed by using <em>g.remove</em>
 or by renaming it to any other name with <em>g.rename</em>.
@@ -35,7 +35,7 @@
 
 The above method for specifying a "mask" may seem
 counterintuitive.  Areas inside the MASK are not hidden;
-areas outside the MASK will be ignored until the MASK file
+areas outside the MASK will be ignored until the MASK map
 is removed.
 <p>
 
@@ -60,19 +60,19 @@
 
 <h2>EXAMPLES</h2>
 
-Creating a raster mask, for showing only elevations of lakes:
+Creating a raster MASK, for showing only elevations of lakes:
 <div class="code"><pre>
 r.mask input=lakes
 # statistics only for elevation pixels in the lakes:
 r.univar elevation
 </pre></div>
 
-Removing a raster mask with the -r flag:
+Removing a raster MASK with the -r flag:
 <div class="code"><pre>
 r.mask -r
 </pre></div>
 
-Creating a mask from categories 3 through 6 in the North Carolina
+Creating a MASK from categories 3 through 6 in the North Carolina
 'geology_30m' raster map:
 <div class="code"><pre>
 g.region rast=geology_30m -p

Modified: grass/branches/develbranch_6/scripts/r.mask/r.mask
===================================================================
--- grass/branches/develbranch_6/scripts/r.mask/r.mask	2012-05-15 13:47:44 UTC (rev 51625)
+++ grass/branches/develbranch_6/scripts/r.mask/r.mask	2012-05-15 19:48:38 UTC (rev 51626)
@@ -57,7 +57,7 @@
   exec g.parser "$0" "$@"
 fi
 
-if [ ! -z "$GRASS_OVERWRITE" ] ; then
+if [ -n "$GRASS_OVERWRITE" ] && [ "$GRASS_OVERWRITE" -eq 1 ] ; then
    GIS_FLAG_O=1
 fi
 



More information about the grass-commit mailing list