[GRASS-CVS] markus: grass6/scripts/d.vect.thematic d.vect.thematic, 1.55, 1.55.2.1

grass at intevation.de grass at intevation.de
Fri Nov 23 10:50:51 EST 2007


Author: markus

Update of /grassrepository/grass6/scripts/d.vect.thematic
In directory doto:/tmp/cvs-serv18412

Modified Files:
      Tag: releasebranch_6_3
	d.vect.thematic 
Log Message:
fix for line type; use user chosen layer (merge from HEAD)

Index: d.vect.thematic
===================================================================
RCS file: /grassrepository/grass6/scripts/d.vect.thematic/d.vect.thematic,v
retrieving revision 1.55
retrieving revision 1.55.2.1
diff -u -d -r1.55 -r1.55.2.1
--- d.vect.thematic	9 May 2007 10:05:29 -0000	1.55
+++ d.vect.thematic	23 Nov 2007 15:50:49 -0000	1.55.2.1
@@ -240,7 +240,7 @@
 MAX_LEG_ITEMS=18
 
 # check column type
-COLTYPE="`v.info -c $GIS_OPT_MAP layer=1 2> /dev/null | grep -w $GIS_OPT_COLUMN | cut -d'|' -f1 | tr -s '[:upper:]' '[:lower:]'`"
+COLTYPE="`v.info -c $GIS_OPT_MAP layer=$GIS_OPT_LAYER 2> /dev/null | grep -w $GIS_OPT_COLUMN | cut -d'|' -f1 | tr -s '[:upper:]' '[:lower:]'`"
 
 #COLTYPE=... 
 if [ -z "$COLTYPE" ] ; then 
@@ -372,9 +372,17 @@
 
 # Calculate statistics for thematic intervals
 if [ -z "$GIS_OPT_WHERE" ] ; then
-  v.univar -e -g map=$GIS_OPT_MAP type=point,centroid column=$GIS_OPT_COLUMN > "$TMP1"
+  if [ "$GIS_OPT_TYPE" = "line" ] ; then
+     v.univar -e -g map=$GIS_OPT_MAP type=line column=$GIS_OPT_COLUMN > "$TMP1"
+  else
+     v.univar -e -g map=$GIS_OPT_MAP type=point,centroid column=$GIS_OPT_COLUMN > "$TMP1"
+  fi
 else
-  v.univar -e -g map=$GIS_OPT_MAP type=point,centroid column=$GIS_OPT_COLUMN where="$GIS_OPT_WHERE" > "$TMP1"
+  if [ "$GIS_OPT_TYPE" = "line" ] ; then
+     v.univar -e -g map=$GIS_OPT_MAP type=line column=$GIS_OPT_COLUMN where="$GIS_OPT_WHERE" > "$TMP1"
+ else
+     v.univar -e -g map=$GIS_OPT_MAP type=point,centroid column=$GIS_OPT_COLUMN where="$GIS_OPT_WHERE" > "$TMP1"
+ fi
 fi
   
 min="`grep 'min=' $TMP1 | sed s/min=//`"




More information about the grass-commit mailing list