[GRASS-SVN] r63644 - in grass/trunk: general/g.remove/testsuite gui/wxpython/gmodeler lib/python/gunittest lib/python/gunittest/testsuite lib/python/script lib/python/temporal raster3d/r3.flow/testsuite raster3d/r3.gradient/testsuite raster3d/r3.in.bin/test_suite raster3d/r3.out.netcdf/test_suite scripts/d.rast.edit scripts/db.in.ogr scripts/i.in.spotvgt scripts/i.pansharpen scripts/r.buffer.lowmem scripts/r.colors.stddev scripts/r.fillnulls scripts/r.mask scripts/r.reclass.area scripts/v.dissolve scripts/v.out.gps scripts/v.rast.stats scripts/v.to.lines scripts/v.unpack temporal/t.rast.accumulate temporal/t.rast.neighbors temporal/t.rast.out.vtk temporal/t.rast.to.rast3 temporal/t.rast.to.rast3/testsuite temporal/t.vect.what.strds tools

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 20 06:10:32 PST 2014


Author: neteler
Date: 2014-12-20 06:10:32 -0800 (Sat, 20 Dec 2014)
New Revision: 63644

Modified:
   grass/trunk/general/g.remove/testsuite/test_g_remove.py
   grass/trunk/gui/wxpython/gmodeler/frame.py
   grass/trunk/gui/wxpython/gmodeler/model.py
   grass/trunk/lib/python/gunittest/case.py
   grass/trunk/lib/python/gunittest/testsuite/test_assertions_vect.py
   grass/trunk/lib/python/script/db.py
   grass/trunk/lib/python/temporal/aggregation.py
   grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py
   grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py
   grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh
   grass/trunk/raster3d/r3.out.netcdf/test_suite/test.r3.out.netcdf.sh
   grass/trunk/scripts/d.rast.edit/d.rast.edit.py
   grass/trunk/scripts/db.in.ogr/db.in.ogr.py
   grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py
   grass/trunk/scripts/i.pansharpen/i.pansharpen.py
   grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py
   grass/trunk/scripts/r.colors.stddev/r.colors.stddev.py
   grass/trunk/scripts/r.fillnulls/r.fillnulls.py
   grass/trunk/scripts/r.mask/r.mask.py
   grass/trunk/scripts/r.reclass.area/r.reclass.area.py
   grass/trunk/scripts/v.dissolve/v.dissolve.py
   grass/trunk/scripts/v.out.gps/v.out.gps.py
   grass/trunk/scripts/v.rast.stats/v.rast.stats.py
   grass/trunk/scripts/v.to.lines/v.to.lines.py
   grass/trunk/scripts/v.unpack/v.unpack.py
   grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py
   grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py
   grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py
   grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py
   grass/trunk/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py
   grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py
   grass/trunk/tools/thumbnails.py
Log:
update g.region/g.rename calls to use new element names (#2409)

Modified: grass/trunk/general/g.remove/testsuite/test_g_remove.py
===================================================================
--- grass/trunk/general/g.remove/testsuite/test_g_remove.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/general/g.remove/testsuite/test_g_remove.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -56,13 +56,13 @@
         rmapcalc("test_two = 2")
 
         module = SimpleModule('g.remove',
-                              type='rast', pattern='test_map_*,*two')
+                              type='raster', pattern='test_map_*,*two')
         self.assertModule(module)
         self.assertMultiLineEqual(module.outputs.stdout,
                                   REMOVE_RASTERS.replace('user1',
                                                          get_current_mapset()))
 
-        module = SimpleModule('g.remove', type='rast',
+        module = SimpleModule('g.remove', type='raster',
                               pattern='test_map_*,*two', flags='f')
         self.assertModule(module)
         self.assertMultiLineEqual(module.outputs.stdout, '')
@@ -74,7 +74,7 @@
         rmapcalc("test_oranges = 200")
         rmapcalc("test_apples_big = 300")
         rmapcalc("test_apples_small = 300")
-        module = SimpleModule('g.remove', type='rast',
+        module = SimpleModule('g.remove', type='raster',
                               pattern='test_{apples,oranges}*',
                               exclude="*_small")
         self.assertModule(module)
@@ -83,7 +83,7 @@
                                   'rast/test_apples_big at user1\n'
                                   'rast/test_oranges at user1\n'.replace(
                                       'user1', get_current_mapset()))
-        module = SimpleModule('g.remove', type='rast',
+        module = SimpleModule('g.remove', type='raster',
                               pattern='test_{apples,oranges}{_small,_big,*}',
                               flags='f')
         self.assertModule(module)
@@ -98,7 +98,7 @@
     def test_re_flags(self):
         """Test that -r and -e flags are exclusive"""
         module = SimpleModule('g.remove', flags='re',
-                              type='rast', pattern='xxxyyyzzz')
+                              type='raster', pattern='xxxyyyzzz')
         self.assertModuleFail(module)
         stderr = module.outputs.stderr
         self.assertIn('-r', stderr)

Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -326,13 +326,13 @@
             dlg.Destroy()
             
             if rast:
-                self._gconsole.RunCmd(['g.remove', '-f', 'type=rast',
+                self._gconsole.RunCmd(['g.remove', '-f', 'type=raster',
                                        'name=%s' %','.join(rast)])
             if rast3d:
-                self._gconsole.RunCmd(['g.remove', '-f', 'type=rast3d',
+                self._gconsole.RunCmd(['g.remove', '-f', 'type=raster_3d',
                                        'name=%s' %','.join(rast3d)])
             if vect:
-                self._gconsole.RunCmd(['g.remove', '-f', 'type=vect',
+                self._gconsole.RunCmd(['g.remove', '-f', 'type=vector',
                                        'name=%s' %','.join(vect)])
             
             self.SetStatusText(_("%d maps deleted from current mapset") % \
@@ -786,7 +786,7 @@
             x = width/2 - 200 + self._randomShift()
             y = height/2 + self._randomShift()
             for p in params['params']:
-                if p.get('prompt', '') in ('raster', 'vector', 'raster3d') and \
+                if p.get('prompt', '') in ('raster', 'vector', 'raster_3d') and \
                         (p.get('value', None) or \
                              (p.get('age', 'old') != 'old' and p.get('required', 'no') == 'yes')):
                     data = layer.FindData(p.get('name', ''))

Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/gui/wxpython/gmodeler/model.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -709,11 +709,11 @@
         rast, vect, rast3d, msg = self.GetIntermediateData()
         
         if rast:
-            log.RunCmd(['g.remove', '-f', 'type=rast', 'name=%s' %','.join(rast)])
+            log.RunCmd(['g.remove', '-f', 'type=raster', 'name=%s' %','.join(rast)])
         if rast3d:
-            log.RunCmd(['g.remove', '-f', 'type=rast3d', 'name=%s' %','.join(rast3d)])
+            log.RunCmd(['g.remove', '-f', 'type=raster_3d', 'name=%s' %','.join(rast3d)])
         if vect:
-            log.RunCmd(['g.remove', '-f', 'type=vect', 'name=%s' %','.join(vect)])
+            log.RunCmd(['g.remove', '-f', 'type=vector', 'name=%s' %','.join(vect)])
         
     def GetIntermediateData(self):
         """Get info about intermediate data"""

Modified: grass/trunk/lib/python/gunittest/case.py
===================================================================
--- grass/trunk/lib/python/gunittest/case.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/lib/python/gunittest/case.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -625,7 +625,7 @@
                                           sep='=', precision=precision,
                                           reference=statistics, msg=msg)
             finally:
-                call_module('g.remove', flags='f', type='rast', name=diff)
+                call_module('g.remove', flags='f', type='raster', name=diff)
         else:
             # general case
             # TODO: we are using r.info min max and r.univar min max interchangably
@@ -651,7 +651,7 @@
             self.assertRasterFitsUnivar(raster=diff, reference=statistics,
                                         precision=precision, msg=msg)
         finally:
-            call_module('g.remove', flags='f', type='rast', name=diff)
+            call_module('g.remove', flags='f', type='raster', name=diff)
 
     def assertRasters3dNoDifference(self, actual, reference,
                                     precision, statistics=None, msg=None):
@@ -741,7 +741,7 @@
                                             reference=ref_info,
                                             msg=msg, precision=precision)
         finally:
-            call_module('g.remove', flags='f', type='vect', name=remove)
+            call_module('g.remove', flags='f', type='vector', name=remove)
 
     # TODO: write tests
     def assertVectorsNoAreaDifference(self, actual, reference, precision,
@@ -774,7 +774,7 @@
                     va=actual, vr=reference, p=precision, a=total_area)
                 self.fail(self._formatMessage(msg, stdmsg))
         finally:
-            call_module('g.remove', flags='f', type='vect', name=diff)
+            call_module('g.remove', flags='f', type='vector', name=diff)
 
     # TODO: here we have to have significant digits which is not consistent
     # TODO: documentation for all new asserts
@@ -838,7 +838,7 @@
             # we rely on fail method to either raise or return (soon)
             os.remove(factual)
             if vreference:
-                self.runModule('g.remove', flags='f', type='vect', name=vreference)
+                self.runModule('g.remove', flags='f', type='vector', name=vreference)
 
     # TODO: we expect v.out.ascii to give the same order all the time, is that OK?
     def assertVectorAsciiEqualsVectorAscii(self, actual, reference,
@@ -943,10 +943,10 @@
             import re
             if re.search('Raster map.*not found', errors, flags=re.DOTALL):
                 errors += "\nSee available raster maps:\n"
-                errors += call_module('g.list', type='rast')
+                errors += call_module('g.list', type='raster')
             if re.search('Vector map.*not found', errors, flags=re.DOTALL):
                 errors += "\nSee available vector maps:\n"
-                errors += call_module('g.list', type='vect')
+                errors += call_module('g.list', type='vector')
             # TODO: message format, parameters
             raise CalledModuleError(module.popen.returncode, module.name,
                                     module.get_python(),

Modified: grass/trunk/lib/python/gunittest/testsuite/test_assertions_vect.py
===================================================================
--- grass/trunk/lib/python/gunittest/testsuite/test_assertions_vect.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/lib/python/gunittest/testsuite/test_assertions_vect.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -138,7 +138,7 @@
         # when invoking separately, no need to delete maps since mapset
         # is deleted
         if cls.maps_to_remove:
-            cls.runModule('g.remove', flags='f', type='vect',
+            cls.runModule('g.remove', flags='f', type='vector',
                           name=','.join(cls.maps_to_remove))
 
     def test_assertVectorEqualsVector_basic(self):

Modified: grass/trunk/lib/python/script/db.py
===================================================================
--- grass/trunk/lib/python/script/db.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/lib/python/script/db.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -32,7 +32,7 @@
     0
     >>> db_describe('myfirestations') # doctest: +ELLIPSIS
     {'nrows': 71, 'cols': [['cat', 'INTEGER', '20'], ... 'ncols': 22}
-    >>> run_command('g.remove', flags='f', type='vect', name='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vector', name='myfirestations')
     0
 
     :param str table: table name
@@ -72,7 +72,7 @@
     0
     >>> db_table_exist('myfirestations')
     True
-    >>> run_command('g.remove', flags='f', type='vect', name='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vector', name='myfirestations')
     0
 
     :param str table: table name
@@ -130,7 +130,7 @@
 
     >>> db_select(table = 'myfirestations') # doctest: +ELLIPSIS
     (('1', '24', 'Morrisville #3', ... 'HS2A', '1.37'))
-    >>> run_command('g.remove', flags='f', type='vect', name='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vector', name='myfirestations')
     0
 
     :param str sql: SQL statement to perform (or None)
@@ -176,7 +176,7 @@
     >>> db_table_in_vector('myfirestations')
     ['myfirestations at user1']
     >>> db_table_in_vector('mfirestations')
-    >>> run_command('g.remove', flags='f', type='vect', name='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vector', name='myfirestations')
     0
 
     :param str table: name of table to query

Modified: grass/trunk/lib/python/temporal/aggregation.py
===================================================================
--- grass/trunk/lib/python/temporal/aggregation.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/lib/python/temporal/aggregation.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -171,7 +171,7 @@
     if new_map.metadata.get_min() is None and \
        new_map.metadata.get_max() is None:
         if not register_null:
-            gscript.run_command("g.remove", flags='f', type='rast',
+            gscript.run_command("g.remove", flags='f', type='raster',
                                 name=output)
             return None
 

Modified: grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py
===================================================================
--- grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -54,8 +54,8 @@
     def tearDownClass(cls):
         """!Remove the temporary region"""
         cls.del_temp_region()
-        cls.runModule('g.remove', flags='f', type='rast3d', name=','.join(['map_1', 'map_2', 'map_3', 'map_4', 'map_5', 'test_flowaccum']))
-        cls.runModule('g.remove', flags='f', type='vect', name=','.join(['test_flowline', 'test_seeds']))
+        cls.runModule('g.remove', flags='f', type='raster_3d', name=','.join(['map_1', 'map_2', 'map_3', 'map_4', 'map_5', 'test_flowaccum']))
+        cls.runModule('g.remove', flags='f', type='vector', name=','.join(['test_flowline', 'test_seeds']))
         os.remove('./data/flowline_tmp.ascii')
 
     def test_interpolation(self):

Modified: grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py
===================================================================
--- grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -114,7 +114,7 @@
     def tearDownClass(cls):
         """!Remove the temporary region"""
         cls.del_temp_region()
-        cls.runModule('g.remove', flags='f', type='rast3d',
+        cls.runModule('g.remove', flags='f', type='raster_3d',
                       name=','.join(['test_map_1_ref', 'test_map_2_ref',
                                         'test_grad_x', 'test_grad_y',
                                         'test_grad_z', 'test_null_grad_x',

Modified: grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh
===================================================================
--- grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh	2014-12-20 14:10:32 UTC (rev 63644)
@@ -124,7 +124,7 @@
     bottom=0 top=100 west=0 east=180 south=0 north=90 \
     cols=18 rows=9 depths=10
 
-for map in `g.list type=raster3d pattern=test_in_bin_float*` ; do
+for map in `g.list type=raster_3d pattern=test_in_bin_float*` ; do
   r3.out.ascii input=${map} output=${map}.txt precision=0
 done
 
@@ -132,7 +132,7 @@
     diff $i test_out_bin_float.ref
 done
 
-g.remove -f type=raster3d pattern=test_in*
-g.remove -f type=raster3d pattern=test_out*
+g.remove -f type=raster_3d pattern=test_in*
+g.remove -f type=raster_3d pattern=test_out*
 rm test_in_*.txt
 rm test_out_*.bin

Modified: grass/trunk/raster3d/r3.out.netcdf/test_suite/test.r3.out.netcdf.sh
===================================================================
--- grass/trunk/raster3d/r3.out.netcdf/test_suite/test.r3.out.netcdf.sh	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/raster3d/r3.out.netcdf/test_suite/test.r3.out.netcdf.sh	2014-12-20 14:10:32 UTC (rev 63644)
@@ -31,4 +31,4 @@
 r3.info volume_time_float
 ncdump -h test_time_float.nc
 
-g.remove -f type=rast3 name=volume_float,volume_double,volume_time_double,volume_time_float
+g.remove -f type=raster_3d name=volume_float,volume_double,volume_time_double,volume_time_float

Modified: grass/trunk/scripts/d.rast.edit/d.rast.edit.py
===================================================================
--- grass/trunk/scripts/d.rast.edit/d.rast.edit.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/d.rast.edit/d.rast.edit.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -495,7 +495,7 @@
 
     def cleanup(self):
 	grass.try_remove(self.tempfile)
-	run('g.remove', flags = 'f', type = 'rast', name = self.tempmap)
+	run('g.remove', flags = 'f', type = 'raster', name = self.tempmap)
 
     def finalize(self):
 	self.save_map()
@@ -529,7 +529,7 @@
 	run('g.region', raster = self.inmap)
 	run('r.patch', input = (self.tempmap, self.outmap), output = self.outmap, overwrite = True)
 	run('r.colors', map = self.outmap, rast = self.inmap)
-	run('g.remove', flags = 'f', type = 'rast', name = self.tempmap)
+	run('g.remove', flags = 'f', type = 'raster', name = self.tempmap)
 
     def read_header(self, infile):
 	wind = {}
@@ -635,7 +635,7 @@
 	run('r.mapcalc', expression = "%s = %d" % (self.tempmap, val))
 	run('r.colors', map = self.tempmap, rast = self.inmap)
 	run('r.out.ppm', input = self.tempmap, out = self.tempfile)
-	run('g.remove', flags = 'f', type = 'rast', name = self.tempmap)
+	run('g.remove', flags = 'f', type = 'raster', name = self.tempmap)
 
 	tempimg = wx.Image(self.tempfile)
 	grass.try_remove(self.tempfile)

Modified: grass/trunk/scripts/db.in.ogr/db.in.ogr.py
===================================================================
--- grass/trunk/scripts/db.in.ogr/db.in.ogr.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/db.in.ogr/db.in.ogr.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -107,7 +107,7 @@
     else:
 	# remove the vector part
 	grass.run_command('v.db.connect', quiet = True, map = output, layer = '1', flags = 'd')
-	grass.run_command('g.remove', flags = 'f', quiet = True, type = 'vect', name = output)
+	grass.run_command('g.remove', flags = 'f', quiet = True, type = 'vector', name = output)
 
     # get rid of superfluous auto-added cat column (and cat_ if present)
     nuldev = file(os.devnull, 'w+')

Modified: grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py
===================================================================
--- grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/i.in.spotvgt/i.in.spotvgt.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -180,7 +180,7 @@
     grass.message(_("Remapping digital numbers to NDVI..."))
     tmpname = "%s_%s" % (name, pid)
     grass.mapcalc("$tmpname = 0.004 * $name - 0.1", tmpname = tmpname, name = name)
-    grass.run_command('g.remove', type = 'rast', name = name, quiet = True, flags = 'f')
+    grass.run_command('g.remove', type = 'raster', name = name, quiet = True, flags = 'f')
     grass.run_command('g.rename', raster = (tmpname, name), quiet = True)
 
     # write cmd history:

Modified: grass/trunk/scripts/i.pansharpen/i.pansharpen.py
===================================================================
--- grass/trunk/scripts/i.pansharpen/i.pansharpen.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/i.pansharpen/i.pansharpen.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -175,7 +175,7 @@
             pr.wait()
 
         # Cleanup
-        grass.run_command('g.remove', flags='f', quiet=True, type='rast',
+        grass.run_command('g.remove', flags='f', quiet=True, type='raster',
                           name='%s,%s,%s' % (panmatch1, panmatch2, panmatch3))
 
     elif sharpen == "ihs":
@@ -206,7 +206,7 @@
                           blue="%s_blue" % out)
 
         # Cleanup
-        grass.run_command('g.remove', flags='f', quiet=True, type='rast',
+        grass.run_command('g.remove', flags='f', quiet=True, type='raster',
                           name=panmatch)
 
     elif sharpen == "pca":
@@ -307,7 +307,7 @@
             pb.wait()
 
         # Cleanup
-        grass.run_command('g.remove', flags='f', quiet=True, type="rast",
+        grass.run_command('g.remove', flags='f', quiet=True, type="raster",
                           pattern='tmp%s*,%s' % (pid, panmatch))
 
     # Could add other sharpening algorithms here, e.g. wavelet transformation
@@ -349,7 +349,7 @@
                       input="{n}_red,{n}_blue,{n}_green".format(n=out))
 
     # Cleanup
-    grass.run_command('g.remove', flags="f", type="rast",
+    grass.run_command('g.remove', flags="f", type="raster",
                       pattern="tmp%s*" % pid, quiet=True)
 
 
@@ -432,7 +432,7 @@
     # create reclass of target from reclass rules file
     result = grass.core.find_file(matched, element='cell')
     if result['fullname']:
-        grass.run_command('g.remove', flags='f', quiet=True, type='rast',
+        grass.run_command('g.remove', flags='f', quiet=True, type='raster',
                           name=matched)
         grass.run_command('r.reclass', input=original, out=matched,
                           rules=outfile.name)

Modified: grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py
===================================================================
--- grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -58,9 +58,9 @@
 # what to do in case of user break:
 def cleanup():
     if grass.find_file(temp_src)['file']:
-        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'rast', name = temp_src)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'raster', name = temp_src)
     if grass.find_file(temp_dist)['file']:
-        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'rast', name = temp_dist)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'raster', name = temp_dist)
 
 def main():
     global temp_dist, temp_src

Modified: grass/trunk/scripts/r.colors.stddev/r.colors.stddev.py
===================================================================
--- grass/trunk/scripts/r.colors.stddev/r.colors.stddev.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/r.colors.stddev/r.colors.stddev.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -40,7 +40,7 @@
 
 def cleanup():
     if tmpmap:
-	grass.run_command('g.remove', flags = 'f', type = 'rast',
+	grass.run_command('g.remove', flags = 'f', type = 'raster',
                       name = tmpmap, quiet = True)
 
 def main():

Modified: grass/trunk/scripts/r.fillnulls/r.fillnulls.py
===================================================================
--- grass/trunk/scripts/r.fillnulls/r.fillnulls.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/r.fillnulls/r.fillnulls.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -101,9 +101,9 @@
 def cleanup():
     #delete internal mask and any TMP files:
     if len(tmp_vmaps) > 0:
-        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'vect', name = tmp_vmaps)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'vector', name = tmp_vmaps)
     if len(tmp_rmaps) > 0:
-        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'rast', name = tmp_rmaps)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'raster', name = tmp_rmaps)
     if usermask and mapset:
         if grass.find_file(usermask, mapset = mapset)['file']:
             grass.run_command('g.rename', quiet = True, raster = (usermask, 'MASK'), overwrite = True)
@@ -253,7 +253,7 @@
             
             # remove temporary map to not overfill disk
             try:
-                grass.run_command('g.remove', flags='fb', type='vect',
+                grass.run_command('g.remove', flags='fb', type='vector',
                                   name=holename + '_pol', quiet=quiet)
             except CalledModuleError:
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
@@ -360,7 +360,7 @@
                 pass
             try:
                 grass.run_command('g.remove', quiet=quiet,
-                                  flags='fb', type='rast',
+                                  flags='fb', type='raster',
                                   name=(holename,
                                         holename + '_grown',
                                         holename + '_edges',
@@ -373,7 +373,7 @@
                 pass
             try:
                 grass.run_command('g.remove', quiet=quiet, flags='fb',
-                                  type='vect', name=holename)
+                                  type='vector', name=holename)
             except CalledModuleError:
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
     

Modified: grass/trunk/scripts/r.mask/r.mask.py
===================================================================
--- grass/trunk/scripts/r.mask/r.mask.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/r.mask/r.mask.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -75,10 +75,10 @@
 
 def cleanup():
     if tmp:
-        grass.run_command('g.remove', flags = 'f', type = 'rast',
+        grass.run_command('g.remove', flags = 'f', type = 'raster',
                           name = tmp, quiet = True)
     if tmp_hull:
-        grass.run_command('g.remove', flags = 'f', type = 'vect',
+        grass.run_command('g.remove', flags = 'f', type = 'vector',
                           name = tmp_hull, quiet = True)
 
 def main():
@@ -101,7 +101,7 @@
         # -> remove
         if exists:
             grass.run_command('g.remove', flags = 'f', quiet = True,
-                              type = 'rast', name = 'MASK')
+                              type = 'raster', name = 'MASK')
             grass.message(_("Raster MASK removed"))
         else:
             grass.fatal(_("No existing MASK to remove"))
@@ -113,7 +113,7 @@
             else:
                 grass.warning(_("MASK already exists and will be overwritten"))
                 grass.run_command('g.remove', flags = 'f', quiet = True,
-                                  type = 'rast', name = 'MASK')
+                                  type = 'raster', name = 'MASK')
         
         if raster:
             # check if input raster exists

Modified: grass/trunk/scripts/r.reclass.area/r.reclass.area.py
===================================================================
--- grass/trunk/scripts/r.reclass.area/r.reclass.area.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/r.reclass.area/r.reclass.area.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -221,10 +221,10 @@
     TMPRAST.reverse()  # reclassed map first
     for mapp in TMPRAST:
         if method == 'rmarea':
-            grass.run_command("g.remove", flags='f', type='vect', name=mapp,
+            grass.run_command("g.remove", flags='f', type='vector', name=mapp,
                               quiet=True)
         else:
-            grass.run_command("g.remove", flags='f', type='rast', name=mapp,
+            grass.run_command("g.remove", flags='f', type='raster', name=mapp,
                               quiet=True)
 
 if __name__ == "__main__":

Modified: grass/trunk/scripts/v.dissolve/v.dissolve.py
===================================================================
--- grass/trunk/scripts/v.dissolve/v.dissolve.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/v.dissolve/v.dissolve.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -43,7 +43,7 @@
 
 def cleanup():
     nuldev = file(os.devnull, 'w')
-    grass.run_command('g.remove', flags = 'f', type = 'vect', name = '%s_%s' % (output, tmp), quiet = True, stderr = nuldev)
+    grass.run_command('g.remove', flags = 'f', type = 'vector', name = '%s_%s' % (output, tmp), quiet = True, stderr = nuldev)
 
 def main():
     global output, tmp

Modified: grass/trunk/scripts/v.out.gps/v.out.gps.py
===================================================================
--- grass/trunk/scripts/v.out.gps/v.out.gps.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/v.out.gps/v.out.gps.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -100,11 +100,11 @@
     # only try to remove map if it exists to avoid ugly warnings
     if tmp_vogb:
 	if grass.find_file(tmp_vogb, element = 'vector')['name']:
-	    grass.run_command('g.remove', flags = 'f', type = 'vect',
+	    grass.run_command('g.remove', flags = 'f', type = 'vector',
                           name = tmp_vogb, quiet = True)
     if tmp_extr:
 	if grass.find_file(tmp_extr, element = 'vector')['name']:
-	    grass.run_command('g.remove', flags = 'f', type = 'vect',
+	    grass.run_command('g.remove', flags = 'f', type = 'vector',
                           name = tmp_vogb, quiet = True)
 
 tmp = None

Modified: grass/trunk/scripts/v.rast.stats/v.rast.stats.py
===================================================================
--- grass/trunk/scripts/v.rast.stats/v.rast.stats.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/v.rast.stats/v.rast.stats.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -70,9 +70,9 @@
 
 def cleanup():
     if rastertmp:
-        grass.run_command('g.remove', flags='f', type='rast',
+        grass.run_command('g.remove', flags='f', type='raster',
                           name=rastertmp, quiet=True)
-    grass.run_command('g.remove', flags='f', type='rast',
+    grass.run_command('g.remove', flags='f', type='raster',
                       name='MASK', quiet=True, stderr=nuldev)
     if mask_found:
         grass.message(_("Restoring previous MASK..."))
@@ -296,7 +296,7 @@
         grass.warning(_("Failed to upload statistics to attribute table of vector map <%s>.") % vector)
         exitcode = 1
     finally:
-         grass.run_command('g.remove', flags='f', type='rast',
+         grass.run_command('g.remove', flags='f', type='raster',
                            name='MASK', quiet=True, stderr=nuldev)
 
     sys.exit(exitcode)

Modified: grass/trunk/scripts/v.to.lines/v.to.lines.py
===================================================================
--- grass/trunk/scripts/v.to.lines/v.to.lines.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/v.to.lines/v.to.lines.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -95,7 +95,7 @@
                           option='add', input=input, out=input_tmp,
                           quiet=quiet)
     except CalledModuleError:
-        grass.run_command('g.remove', flags='f', type='vect',
+        grass.run_command('g.remove', flags='f', type='vector',
                           name=input_tmp, quiet=quiet)
         grass.fatal(_("Error creating layer 2"))
     try:
@@ -103,14 +103,14 @@
                           columns="left integer,right integer",
                           quiet=quiet)
     except CalledModuleError:
-        grass.run_command('g.remove', flags='f', type='vect',
+        grass.run_command('g.remove', flags='f', type='vector',
                           name=input_tmp, quiet=quiet)
         grass.fatal(_("Error creating new table for layer 2"))
     try:
         grass.run_command('v.to.db', map=input_tmp, option="sides",
                           columns="left,right", layer="2", quiet=quiet)
     except CalledModuleError:
-        grass.run_command('g.remove', flags='f', type='vect',
+        grass.run_command('g.remove', flags='f', type='vector',
                           name=input_tmp, quiet=quiet)
         grass.fatal(_("Error populating new table for layer 2"))
     try:
@@ -118,7 +118,7 @@
                           from_type='boundary', to_type='line',
                           quiet=quiet, layer="2")
     except CalledModuleError:
-        grass.run_command('g.remove', flags='f', type='vect',
+        grass.run_command('g.remove', flags='f', type='vector',
                           name=remove_names, quiet=quiet)
         grass.fatal(_("Error converting polygon to line"))
     report = grass.read_command('v.category', flags='g', input=out_type,
@@ -134,7 +134,7 @@
                               type='centroid', layer=2, quiet=quiet,
                               cats='{mi}-{ma}'.format(mi=min_cat, ma=max_cat))
         except CalledModuleError:
-            grass.run_command('g.remove', flags='f', type='vect',
+            grass.run_command('g.remove', flags='f', type='vector',
                               name=remove_names, quiet=quiet)
             grass.fatal(_("Error removing centroids"))
 
@@ -144,7 +144,7 @@
             grass.run_command('v.db.droptable', map=out_type, layer=1,
                               flags='f', quiet=True)
         except CalledModuleError:
-            grass.run_command('g.remove', flags='f', type='vect',
+            grass.run_command('g.remove', flags='f', type='vector',
                               name=remove_names, quiet=quiet)
             grass.fatal(_("Error removing table from layer 1"))
     # TODO: when this except is happaning, it seems that never, so it seems wrong
@@ -155,13 +155,13 @@
                           output=output, layer="2,1", quiet=quiet,
                           overwrite=overwrite)
     except CalledModuleError:
-        grass.run_command('g.remove', flags='f', type='vect',
+        grass.run_command('g.remove', flags='f', type='vector',
                           name=remove_names, quiet=quiet)
         grass.fatal(_("Error adding categories"))
-    grass.run_command('g.remove', flags='f', type='vect',
+    grass.run_command('g.remove', flags='f', type='vector',
                       name=remove_names, quiet=quiet)
     if point:
-        grass.run_command('g.remove', flags='f', type='vect',
+        grass.run_command('g.remove', flags='f', type='vector',
                           name=out_temp, quiet=quiet)
 
 

Modified: grass/trunk/scripts/v.unpack/v.unpack.py
===================================================================
--- grass/trunk/scripts/v.unpack/v.unpack.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/scripts/v.unpack/v.unpack.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -91,7 +91,7 @@
         grass.fatal(_("Vector map <%s> already exists") % map_name)
     elif overwrite == '1' and gfile['file']:
         grass.warning(_("Vector map <%s> already exists and will be overwritten") % map_name)
-        grass.run_command('g.remove', flags='f', quiet=True, type='vect',
+        grass.run_command('g.remove', flags='f', quiet=True, type='vector',
                           name=map_name)
         shutil.rmtree(new_dir, True)
 

Modified: grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py
===================================================================
--- grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -501,7 +501,7 @@
     # Remove empty maps
     if len(empty_maps) > 0:
         for map in empty_maps:
-            grass.run_command("g.remove", flags='f', type="rast", name=map.get_name(), quiet=True)
+            grass.run_command("g.remove", flags='f', type="raster", name=map.get_name(), quiet=True)
 
 if __name__ == "__main__":
     options, flags = grass.parser()

Modified: grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py
===================================================================
--- grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -186,7 +186,7 @@
             else:
                 names += ",%s" % (map.get_name())
 
-        grass.run_command("g.remove", flags='f', type='rast', name=names, quiet=True)
+        grass.run_command("g.remove", flags='f', type='raster', name=names, quiet=True)
 
     dbif.close()
 

Modified: grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py
===================================================================
--- grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -146,8 +146,8 @@
             count += 1
 
     if use_granularity:
-        grass.run_command("g.remove", flags='f', type='rast', name=null_map)
-    grass.run_command("g.remove", flags='f', type='rast', name=map_name)
+        grass.run_command("g.remove", flags='f', type='raster', name=null_map)
+    grass.run_command("g.remove", flags='f', type='raster', name=map_name)
 
 if __name__ == "__main__":
     options, flags = grass.parser()

Modified: grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py
===================================================================
--- grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -151,7 +151,7 @@
         except CalledModuleError:
             grass.fatal(_("Unable to create 3D raster map <%s>" % output))
 
-    grass.run_command("g.remove", flags='f', type='rast', name=null_map)
+    grass.run_command("g.remove", flags='f', type='raster', name=null_map)
 
     title = _("Space time voxel cube")
     descr = _("This space time voxel cube was created with t.rast.to.rast3")

Modified: grass/trunk/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py
===================================================================
--- grass/trunk/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -68,7 +68,7 @@
         """Remove generated data"""
         #self.runModule("t.remove",  flags="rf",  type="strds",  
         #                           inputs="precip_i,precip_f,precip_d")
-        #self.runModule('g.remove', type='rast', pattern='prec_*', flags='f')
+        #self.runModule('g.remove', type='raster', pattern='prec_*', flags='f')
         self.del_temp_region()
 
     def otest_3m(self):
@@ -257,13 +257,13 @@
     def tearDown(self):
         """Remove generated data"""
         #self.runModule("t.remove",  flags="rf",  type="strds", inputs="precip_d")
-        #self.runModule('g.remove', type='rast', pattern='prec_*', flags='f')
+        #self.runModule('g.remove', type='raster', pattern='prec_*', flags='f')
         self.del_temp_region()
 
     def otest_years(self):
         """Convert STRDS into 3d raster map, granularity5 years"""
 
-        self.runModule("t.register", flags="i",  type="rast",  input="precip_d",  
+        self.runModule("t.register", flags="i",  type="raster",  input="precip_d",  
                        maps="prec_1d,prec_2d,prec_3d,prec_4d,prec_5d,prec_6d",  
                        start="2000-01-01", increment="5 years")
 
@@ -291,7 +291,7 @@
     def otest_months(self):
         """Convert STRDS into 3d raster map, granularity 6 months"""
 
-        self.runModule("t.register", flags="i",  type="rast",  input="precip_d",  
+        self.runModule("t.register", flags="i",  type="raster",  input="precip_d",  
                        maps="prec_1d,prec_2d,prec_3d,prec_4d,prec_5d,prec_6d",  
                        start="2000-01-01", increment="6 months")
 
@@ -319,7 +319,7 @@
     def otest_days(self):
         """Convert STRDS into 3d raster map, granularity 7 days"""
 
-        self.runModule("t.register", flags="i",  type="rast",  input="precip_d",  
+        self.runModule("t.register", flags="i",  type="raster",  input="precip_d",  
                        maps="prec_1d,prec_2d,prec_3d,prec_4d,prec_5d,prec_6d",  
                        start="2000-01-01", increment="7 days")
 
@@ -348,7 +348,7 @@
     def otest_hours(self):
         """Convert STRDS into 3d raster map, granularity 7 days"""
 
-        self.runModule("t.register", flags="i",  type="rast",  input="precip_d",  
+        self.runModule("t.register", flags="i",  type="raster",  input="precip_d",  
                        maps="prec_1d,prec_2d,prec_3d,prec_4d,prec_5d,prec_6d",  
                        start="2000-01-01", increment="3 hours")
 
@@ -377,7 +377,7 @@
     def otest_minutes(self):
         """Convert STRDS into 3d raster map, granularity 7 days"""
 
-        self.runModule("t.register", flags="i",  type="rast",  input="precip_d",  
+        self.runModule("t.register", flags="i",  type="raster",  input="precip_d",  
                        maps="prec_1d,prec_2d,prec_3d,prec_4d,prec_5d,prec_6d",  
                        start="2000-01-01", increment="17 minutes")
 

Modified: grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py
===================================================================
--- grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -188,7 +188,7 @@
 
                 if aggreagated_map_name:
                     try:
-                        grass.run_command("g.remove", flags='f', type='rast',
+                        grass.run_command("g.remove", flags='f', type='raster',
                                           name=aggreagated_map_name)
                     except CalledModuleError:
                         dbif.close()

Modified: grass/trunk/tools/thumbnails.py
===================================================================
--- grass/trunk/tools/thumbnails.py	2014-12-20 12:34:28 UTC (rev 63643)
+++ grass/trunk/tools/thumbnails.py	2014-12-20 14:10:32 UTC (rev 63644)
@@ -30,10 +30,10 @@
     if tmp_img:
         grass.try_remove(tmp_img)
     if tmp_grad_rel:
-        grass.run_command('g.remove', flags = 'f', type = 'rast',
+        grass.run_command('g.remove', flags = 'f', type = 'raster',
                           name = tmp_grad_rel, quiet = True)
     if tmp_grad_abs:
-        grass.run_command('g.remove', flags = 'f', type = 'rast',
+        grass.run_command('g.remove', flags = 'f', type = 'raster',
                           name = tmp_grad_abs, quiet = True)
 
 # def rotate(src, dst):



More information about the grass-commit mailing list