[GRASS-SVN] r58922 - grass/branches/develbranch_6/raster/r.li/r.li.setup

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 6 22:12:50 PST 2014


Author: hamish
Date: 2014-02-06 22:12:50 -0800 (Thu, 06 Feb 2014)
New Revision: 58922

Modified:
   grass/branches/develbranch_6/raster/r.li/r.li.setup/masked_area_selection.sh
   grass/branches/develbranch_6/raster/r.li/r.li.setup/sample_area_vector.sh
Log:
sample shape selection: quieten script,
make sample rast mask map names special,
show area outlines not as opaque.


Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/masked_area_selection.sh
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/masked_area_selection.sh	2014-02-07 06:00:47 UTC (rev 58921)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/masked_area_selection.sh	2014-02-07 06:12:50 UTC (rev 58922)
@@ -135,14 +135,12 @@
    fi
 done
 
-# open the Xmonitor
-d.mon stop="$XMON"
-d.mon start="$XMON"
+d.mon start="$XMON" --quiet
 
-d.rast -o map="$GIS_OPT_raster"
+d.rast -o map="$GIS_OPT_raster" --quiet
 
 if [ -n "$GIS_OPT_vector" ] ; then
-    d.vect map="$GIS_OPT_vector"
+    d.vect map="$GIS_OPT_vector" type=area fcolor=none width=2
 fi
 if [ -n "$GIS_OPT_site" ] ; then 
     d.vect map="$GIS_OPT_site" color=red fcolor=red size=5 icon=basic/circle
@@ -151,16 +149,18 @@
 # setup for drawing area
 if [ "$GIS_FLAG_c" -eq 1 ] ; then
    RDIG_INSTR="$f_path/circle.txt"
+   STYLE="circle"
 else
    RDIG_INSTR="$f_path/polygon.txt"
+   STYLE="polygon"
 fi
 
 # feed options to r.digit
-r.digit output="tmp_rli_mask.$$" < "$RDIG_INSTR"
+r.digit output="tmp_rli_mask.$$" --quiet < "$RDIG_INSTR"
 
 
 # show the selected area
-d.rast -o map="tmp_rli_mask.$$"
+d.rast -o map="tmp_rli_mask.$$" --quiet
 
 name="$TMP.val"
 export name
@@ -173,10 +173,11 @@
 
 
 if [ "$ok" -eq 1 ] ; then
+    mask_name="rli_samp_${STYLE}_${r_name}"
     # r.mask + 'g.region zoom= align=' + 'r.mapcalc cropmap=map' would be cleaner?
-    r.to.vect input="tmp_rli_mask.$$" output="tmp_rli_mask_v$$" feature=area
+    r.to.vect input="tmp_rli_mask.$$" output="tmp_rli_mask_v$$" feature=area --quiet
     g.region vect="tmp_rli_mask_v$$"
-    v.to.rast input="tmp_rli_mask_v$$" output="$r_name" value=1 use=val
+    v.to.rast input="tmp_rli_mask_v$$" output="$mask_name" use=val value=1  --quiet
 
     # write info in configuration file
     eval `g.region -g`
@@ -185,7 +186,7 @@
     east="$e"
     west="$w"
 
-    echo "SAMPLEAREAMASKED $r_name $north|$south|$east|$west" >> \
+    echo "SAMPLEAREAMASKED $mask_name $north|$south|$east|$west" >> \
 	    "$GIS_OPT_conf"
 
     # remove tmp raster and vector
@@ -204,7 +205,7 @@
 fi
 
 
-d.mon stop="$XMON"
+d.mon stop="$XMON" --quiet
 
 # clean tmp files
 cleanup

Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/sample_area_vector.sh
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/sample_area_vector.sh	2014-02-07 06:00:47 UTC (rev 58921)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/sample_area_vector.sh	2014-02-07 06:12:50 UTC (rev 58922)
@@ -165,7 +165,7 @@
 
     if [ "$ok" -eq 1 ] ; then
 	#area selected, create mask
-	mask_name="rli_${input_vector}_${CAT}_${r_name}"
+	mask_name="rli_samp_${input_vector}_${CAT}_${r_name}"
 	v.to.rast input="$EXTRACT" output="$mask_name" use=cat --quiet
 
 	# save the region settings into the configuration file



More information about the grass-commit mailing list