[GRASS-SVN] r60078 - in grass-addons/grass6: raster/r.surf.nnbathy vector/v.autokrige vector/v.breach vector/v.in.osm2 vector/v.mainchannel vector/v.out.gmt vector/v.random.cover vector/v.selmany
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun May 4 14:56:24 PDT 2014
Author: hamish
Date: 2014-05-04 14:56:24 -0700 (Sun, 04 May 2014)
New Revision: 60078
Modified:
grass-addons/grass6/raster/r.surf.nnbathy/r.surf.nnbathy
grass-addons/grass6/vector/v.autokrige/v.autokrige
grass-addons/grass6/vector/v.breach/v.breach
grass-addons/grass6/vector/v.in.osm2/v.in.osm
grass-addons/grass6/vector/v.mainchannel/v.mainchannel
grass-addons/grass6/vector/v.out.gmt/v.out.gmt
grass-addons/grass6/vector/v.random.cover/v.random.cover
grass-addons/grass6/vector/v.selmany/v.selmany
Log:
only read region, don't alter WIND file (#2230); minor quoting
Modified: grass-addons/grass6/raster/r.surf.nnbathy/r.surf.nnbathy
===================================================================
--- grass-addons/grass6/raster/r.surf.nnbathy/r.surf.nnbathy 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/raster/r.surf.nnbathy/r.surf.nnbathy 2014-05-04 21:56:24 UTC (rev 60078)
@@ -177,7 +177,7 @@
set -e
# grab the current region settings
-eval `g.region -g`
+eval `g.region -gu`
# spit out non-null (-n) raster coords + values to be interpolated
r.stats -1gn input="$INPUT" --quiet > "$TMP.$PROG.input_xyz"
Modified: grass-addons/grass6/vector/v.autokrige/v.autokrige
===================================================================
--- grass-addons/grass6/vector/v.autokrige/v.autokrige 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/vector/v.autokrige/v.autokrige 2014-05-04 21:56:24 UTC (rev 60078)
@@ -213,7 +213,7 @@
#grid number of cells : more cells increase both raster quality and computation time
if [ -n "$GIS_OPT_NBCELL" ] ; then
- eval `g.region -g`
+ eval `g.region -gu`
nsminres=$(echo "scale=10; ("$n"-"$s")/"$GIS_OPT_NBCELL"" | bc )
ewminres=$(echo "scale=10; ("$e"-"$w")/"$GIS_OPT_NBCELL"" | bc )
if [ "$(echo "if (${nsminres} > ${ewminres}) 1" | bc)" -eq 1 ]; then
@@ -227,7 +227,7 @@
fi
#now define kriged grid cell size : we take region resolution as cell size. Only one value is needed because the R script use square cells
-eval `g.region -g`
+eval `g.region -gu`
if [ "$(echo "if (${nsres} > ${ewres}) 1" | bc)" -eq 1 ] ; then
cellsize=$(echo "scale=10; ("$nsres"/1)" | bc )
else
Modified: grass-addons/grass6/vector/v.breach/v.breach
===================================================================
--- grass-addons/grass6/vector/v.breach/v.breach 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/vector/v.breach/v.breach 2014-05-04 21:56:24 UTC (rev 60078)
@@ -248,15 +248,15 @@
# set the region to match whole input vector but respect current resolution
res=$nsres
-g.region vect="${INL}" res=$res save="region_${UNQ}" -a -u > /dev/null
+g.region vect="$INL" res=$res save="region_$UNQ" -a -u > /dev/null
# we need to repeat this for there is a bug/feature that setting bot res=, -a
# and vect= might not work as expected
-g.region region="region_${UNQ}" vect="${INL}" res=$res save="region_${UNQ}" -a -u --o > /dev/null
+g.region region="region_$UNQ" vect="$INL" res=$res save="region_$UNQ" -a -u --o > /dev/null
-WIND_OVERRIDE="region_${UNQ}"
+WIND_OVERRIDE="region_$UNQ"
export WIND_OVERRIDE
-eval `g.region -g` > /dev/null
+eval `g.region -gu`
# make a raster that will encompass all the input lines; each cell must have an
# unique value
Modified: grass-addons/grass6/vector/v.in.osm2/v.in.osm
===================================================================
--- grass-addons/grass6/vector/v.in.osm2/v.in.osm 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/vector/v.in.osm2/v.in.osm 2014-05-04 21:56:24 UTC (rev 60078)
@@ -85,7 +85,7 @@
# get bounding box in WGS84
-eval `g.region -bg`
+eval `g.region -bgu`
BBOX="$ll_w,$ll_s,$ll_e,$ll_n"
Modified: grass-addons/grass6/vector/v.mainchannel/v.mainchannel
===================================================================
--- grass-addons/grass6/vector/v.mainchannel/v.mainchannel 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/vector/v.mainchannel/v.mainchannel 2014-05-04 21:56:24 UTC (rev 60078)
@@ -87,7 +87,7 @@
echo "$xcoor|$ycoor|1" | v.in.ascii out=end_basin
-thr=`g.region -p | grep nsres | cut -f2 -d':' | tr -d ' '`
+thr=`g.region -pu | grep nsres | cut -f2 -d':' | tr -d ' '`
thresh=`echo "$thr*1.5" | bc -l | cut -f1 -d'.'`
Modified: grass-addons/grass6/vector/v.out.gmt/v.out.gmt
===================================================================
--- grass-addons/grass6/vector/v.out.gmt/v.out.gmt 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/vector/v.out.gmt/v.out.gmt 2014-05-04 21:56:24 UTC (rev 60078)
@@ -114,8 +114,8 @@
output_ps="$output_base.ps"
# get our geographic extents
-eval `g.region -g`
-eval `g.region -ge`
+eval `g.region -gu`
+eval `g.region -geu`
# preserve aspect ratio from UTM E,N coordinates:
aspect_ratio=`echo $ns_extent $ew_extent | awk '{printf("%f", $1 / $2)}'`
Modified: grass-addons/grass6/vector/v.random.cover/v.random.cover
===================================================================
--- grass-addons/grass6/vector/v.random.cover/v.random.cover 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/vector/v.random.cover/v.random.cover 2014-05-04 21:56:24 UTC (rev 60078)
@@ -151,8 +151,8 @@
# proportion of in-area to region area
-NS_EXT=`g.region -em | grep north | cut -f2 -d':' | awk '{print $1}'`
-EW_EXT=`g.region -em | grep east | cut -f2 -d':' | awk '{print $1}'`
+NS_EXT=`g.region -emu | grep north | cut -f2 -d':' | awk '{print $1}'`
+EW_EXT=`g.region -emu | grep east | cut -f2 -d':' | awk '{print $1}'`
REGION_AREA=`echo "$NS_EXT" "$EW_EXT" | awk '{print $1 * $2}'`
v.report map="vranda_cover_$$" option=area units=meters > "$TMP"
Modified: grass-addons/grass6/vector/v.selmany/v.selmany
===================================================================
--- grass-addons/grass6/vector/v.selmany/v.selmany 2014-05-04 20:18:39 UTC (rev 60077)
+++ grass-addons/grass6/vector/v.selmany/v.selmany 2014-05-04 21:56:24 UTC (rev 60078)
@@ -152,7 +152,7 @@
if [ ! "${catreport}" ] ; then
g.message -e message="Input map $GIS_OPT_VECTOR seems to have no categories.
Check and try to run v.category :
- v.category --o input=$GIS_OPT_VECTOR output=${GIS_OPT_VECTOR}c option=add step=1 type=${GIS_OPT_TYPE}
+ v.category --o input=$GIS_OPT_VECTOR output=${GIS_OPT_VECTOR}c option=add step=1 type="$GIS_OPT_TYPE"
for registering objects and restart v.selmany with vector=${GIS_OPT_VECTOR}c"
exit 1
fi
@@ -162,9 +162,9 @@
# if v.db.connect -c says nothing we have no connected table
g.message ""
g.message "Checking database table..."
-tablecheck=`v.db.connect -c map=${GIS_OPT_VECTOR} layer=${GIS_OPT_LAYER}`
+tablecheck=`v.db.connect -c map="$GIS_OPT_VECTOR" layer="$GIS_OPT_LAYER"`
if [ ! "${tablecheck}" ] ; then
- echo "Layer ${GIS_OPT_LAYER} of input map is not connected to any database table!"
+ echo "Layer $GIS_OPT_LAYER of input map is not connected to any database table!"
echo "Should it be connected to a new table? [y]es or [n]o ? (default [n])"
read ANS1
case $ANS1 in
@@ -187,13 +187,13 @@
DBDATABASE=`v.db.connect $GIS_OPT_VECTOR -g | grep -w $GIS_OPT_LAYER | awk '{print $4}'`
DBDRIVER=`v.db.connect $GIS_OPT_VECTOR -g | grep -w $GIS_OPT_LAYER | awk '{print $5}'`
-g.region vect=${GIS_OPT_VECTOR}
+g.region vect="$GIS_OPT_VECTOR"
d.erase
# SHOW BACKGROUND MAPS
-if [ ${GIS_OPT_BGRAST} ] ; then d.rast ${GIS_OPT_BGRAST} ; fi
-if [ ${GIS_OPT_BGVECT} ] ; then d.vect ${GIS_OPT_BGVECT} color=gray; fi
+if [ ${GIS_OPT_BGRAST} ] ; then d.rast "$GIS_OPT_BGRAST" ; fi
+if [ ${GIS_OPT_BGVECT} ] ; then d.vect "$GIS_OPT_BGVECT" color=gray; fi
# SHOW VECTOR MAP
d.vect map=${GIS_OPT_VECTOR} color=gray
@@ -274,13 +274,13 @@
n* | N*)
;;
esac
- g.remove vect=$TMP 2>/dev/null
+ g.remove vect="$TMP" 2>/dev/null
fi
fi
;;
esac
done
-g.remove vect=$TMP 2>/dev/null
+g.remove vect="$TMP" 2>/dev/null
# END OF MAIN PROCESS LOOP
###########################################################################################
More information about the grass-commit
mailing list