[GRASS-SVN] r56520 - grass/trunk/scripts/r.in.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Fri May 31 09:19:44 PDT 2013


Author: turek
Date: 2013-05-31 09:19:44 -0700 (Fri, 31 May 2013)
New Revision: 56520

Modified:
   grass/trunk/scripts/r.in.wms/wms_base.py
Log:
r.in.wms: use urlparams also in getcapabilities request

Modified: grass/trunk/scripts/r.in.wms/wms_base.py
===================================================================
--- grass/trunk/scripts/r.in.wms/wms_base.py	2013-05-31 12:49:20 UTC (rev 56519)
+++ grass/trunk/scripts/r.in.wms/wms_base.py	2013-05-31 16:19:44 UTC (rev 56520)
@@ -193,7 +193,7 @@
     def _fetchCapabilities(self, options): 
         """!Download capabilities from WMS server
         """
-        cap_url = options['url']
+        cap_url = options['url'].strip()
 
         if "?" in cap_url:
             cap_url += "&"
@@ -206,7 +206,12 @@
             cap_url += "REQUEST=GetTileService"
         else:
             cap_url += "SERVICE=WMS&REQUEST=GetCapabilities&VERSION=" + options['wms_version'] 
+
+        if options['urlparams']:
+            cap_url += "&" + options['urlparams']
+            
         grass.debug('Fetching capabilities file.\n%s' % cap_url)
+
         try:
             cap = self._fetchDataFromServer(cap_url, options['username'], options['password'])
         except (IOError, HTTPException), e:



More information about the grass-commit mailing list