[GRASS-SVN] r55205 - grass/branches/develbranch_6/scripts/r.in.srtm

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 25 14:12:00 PST 2013


Author: hamish
Date: 2013-02-25 14:12:00 -0800 (Mon, 25 Feb 2013)
New Revision: 55205

Modified:
   grass/branches/develbranch_6/scripts/r.in.srtm/r.in.srtm
Log:
better handle spaces in GISDBASE (#1683), bugfix on WinGrass, so candidate for backporting after testing. Replacement code is from m.proj so should be ok

Modified: grass/branches/develbranch_6/scripts/r.in.srtm/r.in.srtm
===================================================================
--- grass/branches/develbranch_6/scripts/r.in.srtm/r.in.srtm	2013-02-25 22:02:59 UTC (rev 55204)
+++ grass/branches/develbranch_6/scripts/r.in.srtm/r.in.srtm	2013-02-25 22:12:00 UTC (rev 55205)
@@ -102,15 +102,11 @@
 LC_NUMERIC=C
 export LC_NUMERIC
 
-eval `g.gisenv`
-: ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
-LOCATION="$GISDBASE/$LOCATION_NAME/$MAPSET"
-PERM="$GISDBASE/$LOCATION_NAME/PERMANENT"
 
-grep -i 'proj: ll' "$PERM/PROJ_INFO" > /dev/null
-if [ $? -ne 0 ] ; then
+PROJ_TYPE=`g.region -p | grep '^proj' | cut -f2 -d" "`
+if [ "$PROJ_TYPE" -ne 3 ] ; then
     g.message -e "SRTM data are in Latitude/Longitude. The current\
-      location's projection differs. STOP."
+      location's projection differs. Quitting."
     exit 1
 fi
 



More information about the grass-commit mailing list