[GRASS-SVN] r63258 - grass/branches/releasebranch_7_0/gui/wxpython/web_services

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 28 08:08:07 PST 2014


Author: turek
Date: 2014-11-28 08:08:07 -0800 (Fri, 28 Nov 2014)
New Revision: 63258

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/web_services/widgets.py
Log:
wx.web_services: fix for srs codes with urn (backported r63059)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/web_services/widgets.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/web_services/widgets.py	2014-11-28 16:05:30 UTC (rev 63257)
+++ grass/branches/releasebranch_7_0/gui/wxpython/web_services/widgets.py	2014-11-28 16:08:07 UTC (rev 63258)
@@ -51,6 +51,7 @@
     sys.path.append(rinwms_path)
 
 from wms_base import WMSDriversInfo
+from srs import Srs 
 
 from grass.pydispatch.signal import Signal
 
@@ -644,7 +645,7 @@
 
         if 'srs' not in self.drv_props['ignored_params']:
             i_srs = self.params['srs'].GetSelection()
-            epsg_num = int(self.projs_list[i_srs].split(':')[1])
+            epsg_num = int(self.projs_list[i_srs].split(':')[-1])
             lcmd.append("srs=%s" % epsg_num)
 
         for k in ['maxcols', 'maxrows', 'urlparams']:
@@ -702,12 +703,12 @@
         if 'srs' not in self.drv_props['ignored_params']:
 
             for proj in projs_list:
-                proj_spl = proj.strip().split(':')
-
+                proj_code = Srs(proj.strip()).getcode()
+                proj_spl = proj_code.split(':')
                 if proj_spl[0].strip().lower() in self.drv_info.GetSrs():
                     try:
                         int(proj_spl[1])
-                        self.projs_list.append(proj)
+                        self.projs_list.append(proj_code)
                     except ValueError, IndexError:
                         continue
 



More information about the grass-commit mailing list