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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 26 10:47:06 EST 2011


Author: martinl
Date: 2011-12-26 07:47:05 -0800 (Mon, 26 Dec 2011)
New Revision: 49920

Modified:
   grass/trunk/scripts/r.in.wms/gdalwarp.py
Log:
r.in.wms: overwrite by default
	  fix mlist_grouped() args


Modified: grass/trunk/scripts/r.in.wms/gdalwarp.py
===================================================================
--- grass/trunk/scripts/r.in.wms/gdalwarp.py	2011-12-26 15:24:46 UTC (rev 49919)
+++ grass/trunk/scripts/r.in.wms/gdalwarp.py	2011-12-26 15:47:05 UTC (rev 49920)
@@ -218,7 +218,7 @@
         # import it into a temporary map
         grass.info(_('Importing raster map...'))
         if grass.run_command('r.in.gdal',
-                             quiet = True,
+                             quiet = True, overwrite = True,
                              flags = self.gdal_flags,
                              input = warpfile,
                              output = tmpmapname) != 0:
@@ -230,7 +230,7 @@
         pattern = tmpmapname + '*'
         grass.debug('Pattern: %s' % pattern)
         mapset = grass.gisenv()['MAPSET']
-        channel_list = grass.mlist_grouped(type = 'rast', pattern = pattern, mapset = mapset)[mapset]
+        channel_list = grass.mlist_grouped(type = 'rast', pattern = pattern)[mapset]
         grass.debug('Channel list: %s' % ','.join(channel_list))
         
         if len(channel_list) < 2: # test for single band data
@@ -319,7 +319,7 @@
     def nowarp_import(self, file, map):
         """Import raster file into GRASS"""
         if grass.run_command('r.in.gdal',
-                             quiet = True,
+                             quiet = True, overwrite = True,
                              flags = 'o' + self.gdal_flags,
                              input = file,
                              output = map) != 0:



More information about the grass-commit mailing list