[GRASS-SVN] r42940 - grass/branches/develbranch_6/scripts/r.in.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 29 08:04:44 EDT 2010


Author: hamish
Date: 2010-07-29 12:04:44 +0000 (Thu, 29 Jul 2010)
New Revision: 42940

Modified:
   grass/branches/develbranch_6/scripts/r.in.wms/wms.request
Log:
quote +proj terms as nadgrids file might be in a path containing a space (thanks Glynn)

Modified: grass/branches/develbranch_6/scripts/r.in.wms/wms.request
===================================================================
--- grass/branches/develbranch_6/scripts/r.in.wms/wms.request	2010-07-29 11:53:44 UTC (rev 42939)
+++ grass/branches/develbranch_6/scripts/r.in.wms/wms.request	2010-07-29 12:04:44 UTC (rev 42940)
@@ -256,18 +256,27 @@
 
 SERVER="${GIS_OPT_MAPSERVER}"
 SRS="${GIS_OPT_SRS}"
+# use `tr '[:upper:]' '[:lower:]'` instead?
 SRS_lower=`echo $SRS | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"`
 
 
 # If the user asserts that this projection is the same as the source
 # use this projection as the source to get a trivial tiling from r.tileset
 if [ $GIS_FLAG_P -eq 1 ] ; then
-	PROJ4_SRS=`g.proj -j`
-	eval `g.proj -p | grep meters | sed "s/\\s*:\\s*/=/"`
-	SRS_SCALE=$meters;
+
+    PROJ4_SRS=`g.proj -j | (
+	PROJ4_SRS=
+	while read line ; do
+	    PROJ4_SRS="$PROJ4_SRS '$line'"
+	done
+	echo "$PROJ4_SRS"
+    )`
+
+    eval `g.proj -p | grep ^meters | sed "s/\\s*:\\s*/=/"`
+    SRS_SCALE=$meters;
 else
-	PROJ4_SRS="+init=$SRS_lower"
-	SRS_SCALE=1
+    PROJ4_SRS="+init=$SRS_lower"
+    SRS_SCALE=1
 fi
 
 WMS_QUERY="${GIS_OPT_WMSQUERY}"



More information about the grass-commit mailing list