Explorar o código

r.in.wms:porting back Hamish Bowman's changes from G6 r.in.wms2 (https://trac.osgeo.org/grass/changeset/56972, https://trac.osgeo.org/grass/changeset/56975 and https://trac.osgeo.org/grass/changeset/56986)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56992 15284696-431f-4ddb-bdfa-cd5b030d7da7
Štěpán Turek %!s(int64=12) %!d(string=hai) anos
pai
achega
1dfcb9951f
Modificáronse 2 ficheiros con 5 adicións e 4 borrados
  1. 1 2
      scripts/r.in.wms/r.in.wms.py
  2. 4 2
      scripts/r.in.wms/wms_base.py

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

@@ -179,7 +179,7 @@ import grass.script as grass
 def GetRegionParams(opt_region):
 
     # set region 
-    if opt_region:  
+    if opt_region:
         reg_spl = opt_region.strip().split('@', 1)
         reg_mapset = '.'
         if len(reg_spl) > 1:
@@ -201,7 +201,6 @@ def GetRegionParams(opt_region):
 
 def main():
 
-
     if 'GRASS' in options['driver']:
         grass.debug("Using GRASS driver")
         from wms_drv import WMSDrv

+ 4 - 2
scripts/r.in.wms/wms_base.py

@@ -264,7 +264,7 @@ class WMSBase:
         # print to output
         cap_lines = cap.readlines()
         for line in cap_lines: 
-            print line
+            print line.rstrip()
         
     def _computeBbox(self):
         """!Get region extent for WMS query (bbox)
@@ -303,7 +303,8 @@ class WMSBase:
             points = grass.read_command('m.proj', flags = 'd',
                                         proj_output = self.proj_srs,
                                         proj_input = self.proj_location,
-                                        input = temp_region) # TODO: stdin
+                                        input = temp_region,
+                                        quiet = True) # TODO: stdin
             grass.try_remove(temp_region)
             if not points:
                 grass.fatal(_("Unable to determine region, %s failed") % 'm.proj')
@@ -523,6 +524,7 @@ class GRASSImporter:
                                  output = self.opt_output ) != 0:
                 grass.fatal(_('%s failed') % 'r.composite')
 
+        grass.message(_('<%s> created.') % self.opt_output)
 
 class WMSDriversInfo:
     def __init__(self):