[GRASS-SVN] r29731 - grass/trunk/scripts/v.dissolve
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 16 20:17:01 EST 2008
Author: hamish
Date: 2008-01-16 20:17:01 -0500 (Wed, 16 Jan 2008)
New Revision: 29731
Modified:
grass/trunk/scripts/v.dissolve/v.dissolve
Log:
key type must be INTEGER
Modified: grass/trunk/scripts/v.dissolve/v.dissolve
===================================================================
--- grass/trunk/scripts/v.dissolve/v.dissolve 2008-01-16 23:26:10 UTC (rev 29730)
+++ grass/trunk/scripts/v.dissolve/v.dissolve 2008-01-17 01:17:01 UTC (rev 29731)
@@ -92,10 +92,16 @@
v.extract -d input="$GIS_OPT_INPUT" output="$GIS_OPT_OUTPUT" type=area \
layer="$GIS_OPT_LAYER"
else
+
+ COLTYPE=`v.info -c "$GIS_OPT_INPUT" --quiet | grep ".*|$GIS_OPT_COLUMN$" | cut -f1 -d'|'`
+ if [ "$COLTYPE" != "INTEGER" ] ; then
+ g.message -e "Key column must be of type INTEGER"
+ exit 1
+ fi
+
table=`v.db.connect $GIS_OPT_INPUT -g | grep -w $GIS_OPT_LAYER | awk '{print $2}'`
if [ -z "$table" ] ; then
g.message -e 'There is no table connected to this map!'
- cleanup
exit 1
fi
v.reclass input="$GIS_OPT_INPUT" output="$GIS_OPT_OUTPUT"_${TMP} layer="$GIS_OPT_LAYER" \
More information about the grass-commit
mailing list