[GRASS-SVN] r30409 -
grass/branches/releasebranch_6_3/scripts/v.report
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 29 20:37:28 EST 2008
Author: hamish
Date: 2008-02-29 20:37:28 -0500 (Fri, 29 Feb 2008)
New Revision: 30409
Modified:
grass/branches/releasebranch_6_3/scripts/v.report/v.report
Log:
copy over versions from trunk with latest fixes
Modified: grass/branches/releasebranch_6_3/scripts/v.report/v.report
===================================================================
--- grass/branches/releasebranch_6_3/scripts/v.report/v.report 2008-03-01 01:36:49 UTC (rev 30408)
+++ grass/branches/releasebranch_6_3/scripts/v.report/v.report 2008-03-01 01:37:28 UTC (rev 30409)
@@ -141,25 +141,26 @@
## NOTE: we suppress -1 cat and 0 cat
if [ $TABLEEXISTS -eq 1 ] ; then
- v.db.select -c map=$MAP layer=$LAYER | sort -n -t'|' -k 1 | grep -v '^0' > "$TMP1"
+ v.db.select -c map="$MAP" layer="$LAYER" | sort -n -t'|' -k 1 | grep -v '^0' > "$TMP1"
if [ `wc -l "$TMP1" | awk '{print $1}'` -eq 0 ] ; then
- KEY=`v.db.connect -g $GIS_OPT_MAP | cut -f3 -d" "`
+ KEY=`v.db.connect -g map="$GIS_OPT_MAP" | grep -w "$LAYER" | cut -f3 -d" "`
g.message -e "There is a table connected to input vector map '$MAP', but\
there are no categories present in the key column '$KEY'. Consider using\
v.to.db to correct this."
exit 1
fi
#fetch the requested attribute sorted by cat:
- v.to.db -p map=$MAP opt=$OPTION col=$COLUMS $UNITSPARAM \
- layer=$LAYER 2> /dev/null | grep -v '^cat' | grep -v '^-1' | grep -v '^0'\
+ v.to.db -p map="$MAP" opt="$OPTION" col="$COLUMS" "$UNITSPARAM" \
+ layer="$LAYER" 2> /dev/null | grep -v '^cat' | grep -v '^-1' | grep -v '^0'\
| sort -n -t'|' -k 1 | cut -d'|' -f2-4 > "$TMP2"
#make pre-table
paste -d'|' "$TMP1" "$TMP2" > "$TMP3"
else
- v.category input=$MAP layer=$LAYER option=print | sort -n | uniq | grep -v '^-1' | grep -v '^0' > "$TMP1"
+ v.category input="$MAP" layer="$LAYER" option=print | sort -n | uniq | \
+ grep -v '^-1' | grep -v '^0' > "$TMP1"
#make pre-table
- v.to.db -p map=$MAP opt=$OPTION col=$COLUMS $UNITSPARAM \
- layer=$LAYER 2> /dev/null | grep -v '^cat' | grep -v '^-1' | grep -v '^0'\
+ v.to.db -p map="$MAP" opt="$OPTION" col="$COLUMS" "$UNITSPARAM" \
+ layer="$LAYER" 2> /dev/null | grep -v '^cat' | grep -v '^-1' | grep -v '^0'\
| sort -n -t'|' -k 1 > "$TMP3"
fi
More information about the grass-commit
mailing list