[GRASS-SVN] r46372 - grass/branches/develbranch_6/scripts/r.mask
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun May 22 11:08:32 EDT 2011
Author: neteler
Date: 2011-05-22 08:08:32 -0700 (Sun, 22 May 2011)
New Revision: 46372
Modified:
grass/branches/develbranch_6/scripts/r.mask/r.mask
Log:
catch user error
Modified: grass/branches/develbranch_6/scripts/r.mask/r.mask
===================================================================
--- grass/branches/develbranch_6/scripts/r.mask/r.mask 2011-05-22 15:08:20 UTC (rev 46371)
+++ grass/branches/develbranch_6/scripts/r.mask/r.mask 2011-05-22 15:08:32 UTC (rev 46372)
@@ -92,6 +92,13 @@
fi
fi
+if [ -n "$GIS_OPT_MASKCATS" -a "$GIS_FLAG_R" -eq 0 ]; then
+ eval `r.info -t $GIS_OPT_INPUT`
+ if [ "$datatype" != "CELL" ] ; then
+ g.message -e "Raster map <$GIS_OPT_INPUT> must be integer for maskcats parameter"
+ exit 1
+ fi
+fi
if [ "$GIS_FLAG_R" -eq 1 ]; then
if test -f "`g.gisenv GISDBASE`/`g.gisenv LOCATION_NAME`/`g.gisenv MAPSET`/cell/MASK" ; then
More information about the grass-commit
mailing list