瀏覽代碼

r.in.wms: improved axes order for wms 1.3.0 (backport https://trac.osgeo.org/grass/changeset/62980)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63254 15284696-431f-4ddb-bdfa-cd5b030d7da7
Štěpán Turek 10 年之前
父節點
當前提交
f246d10ca8
共有 3 個文件被更改,包括 1798 次插入2 次删除
  1. 1 1
      scripts/r.in.wms/Makefile
  2. 1795 0
      scripts/r.in.wms/srs.py
  3. 2 1
      scripts/r.in.wms/wms_drv.py

+ 1 - 1
scripts/r.in.wms/Makefile

@@ -2,7 +2,7 @@ MODULE_TOPDIR = ../..
 
 PGM = r.in.wms
 
-ETCFILES = wms_base wms_drv wms_gdal_drv wms_cap_parsers
+ETCFILES = wms_base wms_drv wms_gdal_drv wms_cap_parsers srs
 
 include $(MODULE_TOPDIR)/include/Make/Script.make
 include $(MODULE_TOPDIR)/include/Make/Python.make

File diff suppressed because it is too large
+ 1795 - 0
scripts/r.in.wms/srs.py


+ 2 - 1
scripts/r.in.wms/wms_drv.py

@@ -41,6 +41,7 @@ except ImportError: # < Python 2.7
 from wms_base import WMSBase, GetSRSParamVal
 
 from wms_cap_parsers import WMTSCapabilitiesTree, OnEarthCapabilitiesTree
+from srs import Srs
 
 class WMSDrv(WMSBase):
     def _download(self):
@@ -443,7 +444,7 @@ class WMSRequestMgr(BaseRequestMgr):
         # CRS:84 and CRS:83 are exception (CRS:83 and CRS:27 need to be tested)
         if srs_param in [84, 83] or version != '1.3.0':
             return bbox
-        elif self._isGeoProj(proj):
+        elif Srs('epsg:' + str(srs_param)).axisorder == 'yx':
             return self._flipBbox(bbox)
 
         return bbox