[GRASS-SVN] r49648 -
grass/branches/develbranch_6/scripts/v.rast.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 11 08:28:14 EST 2011
Author: neteler
Date: 2011-12-11 05:28:13 -0800 (Sun, 11 Dec 2011)
New Revision: 49648
Modified:
grass/branches/develbranch_6/scripts/v.rast.stats/v.rast.stats
Log:
fail on vector maps without areas
Modified: grass/branches/develbranch_6/scripts/v.rast.stats/v.rast.stats
===================================================================
--- grass/branches/develbranch_6/scripts/v.rast.stats/v.rast.stats 2011-12-11 13:28:00 UTC (rev 49647)
+++ grass/branches/develbranch_6/scripts/v.rast.stats/v.rast.stats 2011-12-11 13:28:13 UTC (rev 49648)
@@ -147,6 +147,13 @@
VECTORFULL="${VECTOR}@${VECT_MAPSET}"
fi
+# check the input vector map
+eval `v.info -t map="$VECTORFULL" layer="$GIS_OPT_LAYER"`
+if [ $areas -eq 0 ] ; then
+ g.message -e "No areas found in vector map"
+ exit 1
+fi
+
# check the input raster map
eval `g.findfile element=cell file="$RASTER"`
if [ ! "$file" ] ; then
More information about the grass-commit
mailing list