[GRASS-SVN] r58926 - grass/branches/develbranch_6/raster/r.li/r.li.setup
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 7 00:01:06 PST 2014
Author: hamish
Date: 2014-02-07 00:01:06 -0800 (Fri, 07 Feb 2014)
New Revision: 58926
Modified:
grass/branches/develbranch_6/raster/r.li/r.li.setup/area_query
grass/branches/develbranch_6/raster/r.li/r.li.setup/sample_area_vector.sh
Log:
pre-seed vector overlay cat raster mask names (#2024)
Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/area_query
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/area_query 2014-02-07 07:34:20 UTC (rev 58925)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/area_query 2014-02-07 08:01:06 UTC (rev 58926)
@@ -13,7 +13,7 @@
pack .label
frame .buttons
pack .buttons
- set val ""
+ set val "$env(input_vector)_$env(CAT)"
button .buttons.ok -text "Ok" -command {
frame .name
pack .name
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 07:34:20 UTC (rev 58925)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/sample_area_vector.sh 2014-02-07 08:01:06 UTC (rev 58926)
@@ -112,7 +112,7 @@
if [ "$NUM_CATS" -gt 30 ] ; then
g.message -w "<$GIS_OPT_vector> contains $NUM_CATS areas. Manual selection may be time consuming."
# TODO: d.menu [Continue][Abort] on screen display
-elif [ "$NUM_CATS" -gt 0 ] ; then
+elif [ "$NUM_CATS" -eq 0 ] ; then
g.message -w "<$GIS_OPT_vector> doesn't contain any areas. Aborting selection."
# TODO: d.menu [Ok] on screen display
fi
@@ -152,7 +152,7 @@
# ask the user to analyse this vector and a name for raster in a Tcl GUI
name="$TMP.val" # where find the answer
- export name
+ export name input_vector CAT
# ask if it's ok, save 0,1 to "$name" temp file
"$GRASS_WISH" "$f_path/area_query"
@@ -165,7 +165,7 @@
if [ "$ok" -eq 1 ] ; then
#area selected, create mask
- mask_name="rli_samp_${input_vector}_${CAT}_${r_name}"
+ mask_name="rli_samp_${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