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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 3 01:52:56 PDT 2013


Author: turek
Date: 2013-07-03 01:52:56 -0700 (Wed, 03 Jul 2013)
New Revision: 56992

Modified:
   grass/trunk/scripts/r.in.wms/r.in.wms.py
   grass/trunk/scripts/r.in.wms/wms_base.py
Log:
r.in.wms:porting back Hamish Bowman's changes from G6 r.in.wms2 (r56972, r56975 and r56986)

Modified: grass/trunk/scripts/r.in.wms/r.in.wms.py
===================================================================
--- grass/trunk/scripts/r.in.wms/r.in.wms.py	2013-07-03 08:37:56 UTC (rev 56991)
+++ grass/trunk/scripts/r.in.wms/r.in.wms.py	2013-07-03 08:52:56 UTC (rev 56992)
@@ -179,7 +179,7 @@
 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 main():
 
-
     if 'GRASS' in options['driver']:
         grass.debug("Using GRASS driver")
         from wms_drv import WMSDrv

Modified: grass/trunk/scripts/r.in.wms/wms_base.py
===================================================================
--- grass/trunk/scripts/r.in.wms/wms_base.py	2013-07-03 08:37:56 UTC (rev 56991)
+++ grass/trunk/scripts/r.in.wms/wms_base.py	2013-07-03 08:52:56 UTC (rev 56992)
@@ -264,7 +264,7 @@
         # 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 @@
             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 @@
                                  output = self.opt_output ) != 0:
                 grass.fatal(_('%s failed') % 'r.composite')
 
+        grass.message(_('<%s> created.') % self.opt_output)
 
 class WMSDriversInfo:
     def __init__(self):



More information about the grass-commit mailing list