[GRASS-SVN] r60086 - in grass-addons/grass6/raster: r.cog r.in.xyz.auto r.out.gmt r.out.gmt2 r.out.kap_template
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun May 4 16:53:07 PDT 2014
Author: hamish
Date: 2014-05-04 16:53:07 -0700 (Sun, 04 May 2014)
New Revision: 60086
Modified:
grass-addons/grass6/raster/r.cog/r.cog
grass-addons/grass6/raster/r.in.xyz.auto/r.in.xyz.auto
grass-addons/grass6/raster/r.out.gmt/r.out.gmt
grass-addons/grass6/raster/r.out.gmt2/r.out.gmt2
grass-addons/grass6/raster/r.out.kap_template/r.out.kap_template
Log:
only read region, don't alter WIND file (#2230)
Modified: grass-addons/grass6/raster/r.cog/r.cog
===================================================================
--- grass-addons/grass6/raster/r.cog/r.cog 2014-05-04 23:38:21 UTC (rev 60085)
+++ grass-addons/grass6/raster/r.cog/r.cog 2014-05-04 23:53:07 UTC (rev 60086)
@@ -206,7 +206,7 @@
DZ=`r.univar -g map="$TMP_MAP.dz" | grep '^mean=' | cut -f2 -d'='`
#DZ=`r.univar -g map="$TMP_MAP.dz" | grep '^sum=' | cut -f2 -d'='`
-eval `g.region -g | grep res`
+eval `g.region -gu | grep res`
RES="$nsres"
PI=3.14159265358979323846
Modified: grass-addons/grass6/raster/r.in.xyz.auto/r.in.xyz.auto
===================================================================
--- grass-addons/grass6/raster/r.in.xyz.auto/r.in.xyz.auto 2014-05-04 23:38:21 UTC (rev 60085)
+++ grass-addons/grass6/raster/r.in.xyz.auto/r.in.xyz.auto 2014-05-04 23:53:07 UTC (rev 60086)
@@ -158,7 +158,7 @@
if [ -z "$GIS_OPT_RES" ] ; then
- GIS_OPT_RES=`g.region -g | grep nsres | cut -f2 -d'='`
+ GIS_OPT_RES=`g.region -gu | grep nsres | cut -f2 -d'='`
echo "No resolution given. Using the current N-S resolution: $GIS_OPT_RES"
fi
Modified: grass-addons/grass6/raster/r.out.gmt/r.out.gmt
===================================================================
--- grass-addons/grass6/raster/r.out.gmt/r.out.gmt 2014-05-04 23:38:21 UTC (rev 60085)
+++ grass-addons/grass6/raster/r.out.gmt/r.out.gmt 2014-05-04 23:53:07 UTC (rev 60086)
@@ -133,9 +133,9 @@
fi
# get our geographic extents
-eval `g.region -g`
-ns_extent=`g.region -e | grep south | cut -f2 -d: | sed -e 's=^ =='`
-ew_extent=`g.region -e | grep west | cut -f2 -d: | sed -e 's=^ =='`
+eval `g.region -gu`
+ns_extent=`g.region -eu | grep south | cut -f2 -d: | sed -e 's=^ =='`
+ew_extent=`g.region -eu | grep west | cut -f2 -d: | sed -e 's=^ =='`
# preserve aspect ratio from UTM E,N coordinates:
aspect_ratio=`echo $ns_extent $ew_extent | awk '{printf("%f", $1 / $2)}'`
Modified: grass-addons/grass6/raster/r.out.gmt2/r.out.gmt2
===================================================================
--- grass-addons/grass6/raster/r.out.gmt2/r.out.gmt2 2014-05-04 23:38:21 UTC (rev 60085)
+++ grass-addons/grass6/raster/r.out.gmt2/r.out.gmt2 2014-05-04 23:53:07 UTC (rev 60086)
@@ -179,8 +179,8 @@
fi
# 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/raster/r.out.kap_template/r.out.kap_template
===================================================================
--- grass-addons/grass6/raster/r.out.kap_template/r.out.kap_template 2014-05-04 23:38:21 UTC (rev 60085)
+++ grass-addons/grass6/raster/r.out.kap_template/r.out.kap_template 2014-05-04 23:53:07 UTC (rev 60086)
@@ -157,7 +157,7 @@
fi
-PROJ_TYPE=`g.region -p | grep '^projection' | cut -f2 -d' '`
+PROJ_TYPE=`g.region -pu | grep '^projection' | cut -f2 -d' '`
# 0 : XY
# 99 : other
if [ "$PROJ_TYPE" -eq 0 ] ; then
@@ -272,7 +272,7 @@
MAP_NAME="$MAP_NAME.cropped_$$"
fi
-eval `g.region -g`
+eval `g.region -gu`
#### set up dpi and map scale terms
@@ -282,7 +282,7 @@
else
# calc from map extent and scale
#dpi = rows * scale * i2m / ns_extent
- eval `g.region -eg`
+ eval `g.region -egu`
MAP_SCALE=`echo "$GIS_OPT_SCALE" | cut -f2 -d:`
DPI_NS=`echo "$rows $MAP_SCALE $ns_extent" | awk '{print $1 * $2 * 0.0254 / $3}'`
@@ -298,7 +298,7 @@
# calc from map extent and dpi
#SCALE_NS=$ns_extent/(($rows/$DPI)*$INCH2METER)
#SCALE_EW=$ew_extent/(($cols/$DPI)*$INCH2METER)
- eval `g.region -eg`
+ eval `g.region -egu`
DPI="$GIS_OPT_DPI"
SCALE_NS=`echo "$ns_extent $rows $DPI" | awk '{print $1/(($2/$3)*0.0254)}'`
@@ -446,7 +446,7 @@
if [ "$PROJ_TYPE" -eq 0 ] ; then
eval `g.findfile element=group/$GROUP file=POINTS` #mapset="$GRP_MAPSET"
g.region rast="$MAP_NAME"
- eval `g.region -g`
+ eval `g.region -gu`
grep -v '^#\|0$' "$file" | \
awk -v ROWS=$rows 'BEGIN { N=0; }
{ N++;
@@ -455,7 +455,7 @@
else
# use four corners, NW then clockwise
- eval `g.region -lg`
+ eval `g.region -lgu`
GCP1=0,0,$nw_lat,$nw_long
GCP2=$cols,0,$ne_lat,$ne_long
GCP3=$cols,$rows,$se_lat,$se_long
@@ -530,7 +530,7 @@
g.message -w "Double check bounding polygon came out right."
fi
- eval `g.region -g`
+ eval `g.region -gu`
RESULT=`echo "$w $n|$e $n|$e $s|$w $s" | tr '|' '\n' \
| g.transform group="$GROUP" coords=- order="$ORDER" format=""`
@@ -544,7 +544,7 @@
sw_long=`echo $RESULT | cut -f8 -d' ' | awk '{if ($1 <= 180.0) {print} else {print $1 - 360.0} }'`
else
# use four corners, NW then clockwise
- eval `g.region -lg`
+ eval `g.region -lgu`
fi
CNR1="$nw_lat,$nw_long"
More information about the grass-commit
mailing list