[GRASS-SVN] r63654 - in grass-addons/grass7: imagery/i.fusion.brovey imagery/i.histo.match raster/r.basin raster/r.bioclim raster/r.droka raster/r.fidimo raster/r.hazard.flood raster/r.in.srtm.region raster/r.lake.series raster/r.local.relief raster/r.mcda.input raster/r.mcda.roughset raster/r.popgrowth raster/r.random.weight raster/r.recode.attr raster/r.rock.stability raster/r.roughness.vector raster/r.shaded.pca raster/r.shalstab raster/r.skyview raster/r.soillossbare raster/r.sun.daily raster/r.sun.hourly raster/r.to.vect.tiled raster/r.valley.bottom vector/v.area.weigh vector/v.centerline vector/v.civil/v.civil.road vector/v.civil/v.civil.topo vector/v.colors2 vector/v.concave.hull vector/v.in.geopaparazzi vector/v.isochrones vector/v.lidar.mcc vector/v.neighborhoodmatrix vector/v.surf.icw vector/v.transects
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 20 12:07:43 PST 2014
Author: neteler
Date: 2014-12-20 12:07:43 -0800 (Sat, 20 Dec 2014)
New Revision: 63654
Modified:
grass-addons/grass7/imagery/i.fusion.brovey/i.fusion.brovey.py
grass-addons/grass7/imagery/i.histo.match/i.histo.match.py
grass-addons/grass7/raster/r.basin/r.basin.py
grass-addons/grass7/raster/r.bioclim/r.bioclim.py
grass-addons/grass7/raster/r.droka/r.droka.py
grass-addons/grass7/raster/r.fidimo/r.fidimo.py
grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py
grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py
grass-addons/grass7/raster/r.lake.series/r.lake.series.py
grass-addons/grass7/raster/r.local.relief/r.local.relief.py
grass-addons/grass7/raster/r.mcda.input/r.mcda.input.py
grass-addons/grass7/raster/r.mcda.roughset/r.mcda.roughset.py
grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py
grass-addons/grass7/raster/r.random.weight/r.random.weight.py
grass-addons/grass7/raster/r.random.weight/r.random.weight_legacy.py
grass-addons/grass7/raster/r.recode.attr/r.recode.attr.py
grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py
grass-addons/grass7/raster/r.roughness.vector/r.roughness.vector.py
grass-addons/grass7/raster/r.shaded.pca/r.shaded.pca.py
grass-addons/grass7/raster/r.shalstab/r.shalstab.py
grass-addons/grass7/raster/r.skyview/r.skyview.py
grass-addons/grass7/raster/r.soillossbare/r.soillossbare.py
grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py
grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py
grass-addons/grass7/raster/r.to.vect.tiled/r.to.vect.tiled.py
grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py
grass-addons/grass7/vector/v.area.weigh/v.area.weigh.py
grass-addons/grass7/vector/v.centerline/v.centerline.py
grass-addons/grass7/vector/v.civil/v.civil.road/v.civil.road.py
grass-addons/grass7/vector/v.civil/v.civil.topo/v.civil.topo.py
grass-addons/grass7/vector/v.colors2/v.colors2.py
grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py
grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py
grass-addons/grass7/vector/v.isochrones/v.isochrones.py
grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py
grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py
grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py
grass-addons/grass7/vector/v.transects/v.transects.py
Log:
update g.list/g.remove/g.rename calls to use new element names (#2409)
Modified: grass-addons/grass7/imagery/i.fusion.brovey/i.fusion.brovey.py
===================================================================
--- grass-addons/grass7/imagery/i.fusion.brovey/i.fusion.brovey.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/imagery/i.fusion.brovey/i.fusion.brovey.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -148,7 +148,7 @@
for s, d in [('green','tmp'),('red','green'),('tmp','red')]:
src = "%s.%s" % (out, s)
dst = "%s.%s" % (out, d)
- grass.run_command('g.rename', rast = (src, dst), quiet = True)
+ grass.run_command('g.rename', raster = (src, dst), quiet = True)
else:
#aspect table is nice for LANDSAT and QuickBird:
grass.message(_("Assigning color tables for LANDSAT or QuickBird..."))
Modified: grass-addons/grass7/imagery/i.histo.match/i.histo.match.py
===================================================================
--- grass-addons/grass7/imagery/i.histo.match/i.histo.match.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/imagery/i.histo.match/i.histo.match.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -216,7 +216,7 @@
# check if a output map already exists
result = grass.core.find_file(outname, element='cell')
if result['fullname'] and grass.overwrite():
- grass.run_command('g.remove', flags='f', type='rast', name=outname)
+ grass.run_command('g.remove', flags='f', type='raster', name=outname)
grass.run_command('r.reclass', input=i, out=outname,
rules=outfile.name)
elif result['fullname'] and not grass.overwrite():
Modified: grass-addons/grass7/raster/r.basin/r.basin.py
===================================================================
--- grass-addons/grass7/raster/r.basin/r.basin.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.basin/r.basin.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -213,17 +213,17 @@
r_accumulation = r_accumulation,
r_mask = r_mask)
- grass.run_command('g.remove', flags='f', type='rast', name= r_accumulation, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_accumulation, quiet = True)
- grass.run_command('g.rename', rast = ('tmp',r_accumulation))
+ grass.run_command('g.rename', raster = ('tmp',r_accumulation))
grass.mapcalc("tmp = $r_drainage / $r_mask",
r_drainage = r_drainage,
r_mask = r_mask)
- grass.run_command('g.remove', flags='f', type='rast', name= r_drainage, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_drainage, quiet = True)
- grass.run_command('g.rename', rast = ('tmp', r_drainage))
+ grass.run_command('g.rename', raster = ('tmp', r_drainage))
grass.mapcalc("$r_elevation_crop = $r_elevation * $r_mask",
r_mask = r_mask,
@@ -234,18 +234,18 @@
r_mask = r_mask,
r_drainage_e = r_drainage_e)
- grass.run_command('g.remove', flags='f', type='rast', name= r_drainage_e, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_drainage_e, quiet = True)
- grass.run_command('g.rename', rast = ('tmp',r_drainage_e))
+ grass.run_command('g.rename', raster = ('tmp',r_drainage_e))
grass.mapcalc("tmp = $r_stream_e * $r_mask",
r_mask = r_mask,
r_stream_e = r_stream_e)
- grass.run_command('g.remove', flags='f', type='rast', name= r_stream_e, quiet = True)
- #grass.run_command('g.rename', rast = (r_stream_e,'streams'))
+ grass.run_command('g.remove', flags='f', type='raster', name= r_stream_e, quiet = True)
+ #grass.run_command('g.rename', raster = (r_stream_e,'streams'))
- grass.run_command('g.rename', rast = ('tmp',r_stream_e))
+ grass.run_command('g.rename', raster = ('tmp',r_stream_e))
grass.run_command('r.thin', input = r_stream_e,
output = r_stream_e+'_thin')
@@ -586,40 +586,40 @@
drainage_density = float(Len_streams) / float(area_basin)
# Cleaning up
- grass.run_command('g.remove', flags='f', type='rast', name= 'r_elevation_crop', quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_height_average, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_aspect_mod, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_mainchannel, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_stream_e, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_drainage_e, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_mask, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_ord_1, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_average_hillslope, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_mainchannel_dim, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_outlet, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_basin, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= prefix+'_mainchannel_thin', quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= prefix+'_mainchannel_dim_thin', quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= prefix+'_ord_1_thin', quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= prefix+'_stream_e_thin', quiet = True)
- grass.run_command('g.remove', flags='f', type='vect', name= v_mainchannel_dim+'_point', quiet = True)
- grass.run_command('g.remove', flags='f', type='vect', name= v_mainchannel_dim, quiet = True)
- grass.run_command('g.remove', flags='f', type='vect', name= v_ord_1, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= 'r_elevation_crop', quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_height_average, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_aspect_mod, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_mainchannel, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_stream_e, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_drainage_e, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_mask, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_ord_1, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_average_hillslope, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_mainchannel_dim, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_outlet, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_basin, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= prefix+'_mainchannel_thin', quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= prefix+'_mainchannel_dim_thin', quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= prefix+'_ord_1_thin', quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= prefix+'_stream_e_thin', quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= v_mainchannel_dim+'_point', quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= v_mainchannel_dim, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= v_ord_1, quiet = True)
if nomap :
- grass.run_command('g.remove', flags='f', type='vect', name= v_outlet, quiet = True)
- grass.run_command('g.remove', flags='f', type='vect', name= v_basin, quiet = True)
- grass.run_command('g.remove', flags='f', type='vect', name= v_mainchannel, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_accumulation, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_drainage, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_aspect, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_strahler, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_shreve, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_horton, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_hack, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_distance, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_hillslope_distance, quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= r_slope, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= v_outlet, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= v_basin, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= v_mainchannel, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_accumulation, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_drainage, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_aspect, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_strahler, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_shreve, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_horton, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_hack, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_distance, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_hillslope_distance, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= r_slope, quiet = True)
####################################################
Modified: grass-addons/grass7/raster/r.bioclim/r.bioclim.py
===================================================================
--- grass-addons/grass7/raster/r.bioclim/r.bioclim.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.bioclim/r.bioclim.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -86,7 +86,7 @@
def cleanup():
if tmp_pattern:
- grass.run_command('g.remove', flags = 'f', type = 'rast',
+ grass.run_command('g.remove', flags = 'f', type = 'raster',
pattern = tmp_pattern, quiet = True)
def main():
@@ -155,7 +155,7 @@
tavg = grass.read_command("g.list",
quiet = True,
- type = 'rast',
+ type = 'raster',
pattern = '%s.tavg??.%d' % (outpre, pid),
separator = ',',
mapset= '.')
@@ -173,7 +173,7 @@
grass.run_command('r.support', map = outpre + '.bio01',
description = 'BIOCLIM01: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio01',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'raster', name = output, quiet = True);
# BIO2 = Mean Diurnal Range (Mean of monthly (max temp - min temp))
grass.message(_("BIO2 = Mean Diurnal Range ..."))
@@ -198,7 +198,7 @@
tr = grass.read_command("g.list",
quiet = True,
- type = 'rast',
+ type = 'raster',
pattern = '%s.tr??.%d' % (outpre, pid),
separator = ',',
mapset= '.')
@@ -215,8 +215,8 @@
grass.run_command('r.support', map = outpre + '.bio02',
description = 'BIOCLIM02: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio02',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
- grass.run_command('g.remove', flags = 'f', type = 'rast', pattern = '%s.tr??.%d' % (outpre, pid), quiet = True)
+ grass.run_command('g.remove', flags = 'f', type = 'raster', name = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'raster', pattern = '%s.tr??.%d' % (outpre, pid), quiet = True)
# BIO4 = Temperature Seasonality (standard deviation * 100)
grass.message(_("BIO4 = Temperature Seasonality ..."))
@@ -230,7 +230,7 @@
grass.run_command('r.support', map = outpre + '.bio04',
description = 'BIOCLIM04: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio04',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'raster', name = output, quiet = True);
# BIO5 = Max Temperature of Warmest Month
grass.message(_("BIO5 = Max Temperature of Warmest Month ..."))
@@ -244,7 +244,7 @@
grass.run_command('r.support', map = outpre + '.bio05',
description = 'BIOCLIM05: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio05',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'raster', name = output, quiet = True);
# BIO6 = Min Temperature of Coldest Month
grass.message(_("BIO6 = Min Temperature of Coldest Month ..."))
@@ -258,7 +258,7 @@
grass.run_command('r.support', map = outpre + '.bio06',
description = 'BIOCLIM06: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio06',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'raster', name = output, quiet = True);
# BIO7 = Temperature Annual Range (BIO5-BIO6)
grass.message(_("BIO7 = Temperature Annual Range ..."))
@@ -303,7 +303,7 @@
tavgq = grass.read_command("g.list",
quiet = True,
- type = 'rast',
+ type = 'raster',
pattern = '%s.tavgq.??.%d' % (outpre, pid),
separator = ',',
mapset= '.')
@@ -332,10 +332,10 @@
description = 'BIOCLIM11: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio11',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', flags = 'f', type = 'rast', name = "%s,%s" % (bio10, bio11), quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'raster', name = "%s,%s" % (bio10, bio11), quiet = True);
if not prec:
- grass.run_command('g.remove', flags = 'f', type = 'rast',
+ grass.run_command('g.remove', flags = 'f', type = 'raster',
pattern = tmp_pattern, quiet = True)
sys.exit(1)
@@ -359,7 +359,7 @@
precq = grass.read_command("g.list",
quiet = True,
- type = 'rast',
+ type = 'raster',
pattern = '%s.precq.??.%d' % (outpre, pid),
separator = ',',
mapset= '.')
@@ -607,7 +607,7 @@
description = 'BIOCLIM19: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio19',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', flags = 'f', type = 'rast',
+ grass.run_command('g.remove', flags = 'f', type = 'raster',
pattern = tmp_pattern, quiet = True)
Modified: grass-addons/grass7/raster/r.droka/r.droka.py
===================================================================
--- grass-addons/grass7/raster/r.droka/r.droka.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.droka/r.droka.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -273,7 +273,7 @@
if int(num) == 1:
grass.run_command('g.remove' ,
flags = 'f',
- type = 'vect',
+ type = 'vector',
name = ( 'start_points_' ),
quiet = True )
else:
@@ -282,14 +282,14 @@
quiet = True )
grass.run_command('g.remove' ,
flags = 'f',
- type = 'vect',
+ type = 'vector',
name = (
'start_buffer_',
'start_random_') ,
quiet = True )
grass.run_command('g.remove' ,
flags = 'f',
- type = 'rast',
+ type = 'raster',
name = (
'uno',
'costo',
Modified: grass-addons/grass7/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -209,12 +209,12 @@
if (tmp_map_rast or tmp_map_vect) and not flags['a']:
grass.run_command("g.remove",
flags = 'f',
- type = 'rast',
+ type = 'raster',
name = [f + str(os.getpid()) for f in tmp_map_rast],
quiet = True)
grass.run_command("g.remove",
flags = 'f',
- type = 'vect',
+ type = 'vector',
name = [f + str(os.getpid()) for f in tmp_map_vect],
quiet = True)
@@ -767,7 +767,7 @@
#Calculation Kernel Density from Distance Raster
#only for m=0 because of cdf-function
if grass.find_file(name = "density_from_point_unmasked_tmp_%d" % os.getpid(), element = 'cell')['file']:
- grass.run_command("g.remove", flags = 'f', type = 'rast', name = "density_from_point_unmasked_tmp_%d" % os.getpid())
+ grass.run_command("g.remove", flags = 'f', type = 'raster', name = "density_from_point_unmasked_tmp_%d" % os.getpid())
x1 = garray.array()
x1.read("lower_distance_tmp_%d" % os.getpid())
@@ -969,7 +969,7 @@
overwrite = True)
grass.run_command("g.rename",
- rast = "density_attract_"+str(cat) + "," + "density_"+str(cat),
+ raster = "density_attract_"+str(cat) + "," + "density_"+str(cat),
overwrite=True)
if flags['r']:
@@ -999,7 +999,7 @@
density_segment = "density_segment_"+segment_cat,
mapcalc_string_Aa_aggregate = mapcalc_string_Aa_aggregate,
overwrite = True)
- grass.run_command("g.remove", flags = 'bf', type = 'rast', name = mapcalc_string_Aa_removal)
+ grass.run_command("g.remove", flags = 'bf', type = 'raster', name = mapcalc_string_Aa_removal)
grass.run_command("r.null", map="density_segment_"+segment_cat, null="0") # Final density map per segment, set 0 for aggregation with r.mapcalc
@@ -1012,7 +1012,7 @@
realised_density_segment = "realised_density_segment_"+segment_cat,
mapcalc_string_Ab_aggregate = mapcalc_string_Ab_aggregate,
overwrite = True)
- grass.run_command("g.remove", flags = 'bf', type = 'rast', name = mapcalc_string_Ab_removal)
+ grass.run_command("g.remove", flags = 'bf', type = 'raster', name = mapcalc_string_Ab_removal)
grass.run_command("r.null", map="realised_density_segment_"+segment_cat, null="0") # Final density map per segment, set 0 for aggregation with r.mapcalc
mapcalc_list_Bb.append("realised_density_segment_"+segment_cat)
@@ -1043,7 +1043,7 @@
# Set all 0-values to NULL, Backgroundvalues
grass.run_command("r.null", map="realised_"+output_fidimo+"_"+i, setnull="0")
- grass.run_command("g.remove", flags = 'bf', type = 'rast', name = mapcalc_string_Bb_removal)
+ grass.run_command("g.remove", flags = 'bf', type = 'raster', name = mapcalc_string_Bb_removal)
# backtransformation (divide by scalar which was defined before)
grass.mapcalc("$density_final_corrected = $density_final/$scalar",
@@ -1059,14 +1059,14 @@
grass.run_command("r.null", map=output_fidimo+"_"+i, setnull="0")
- grass.run_command("g.remove", flags = 'bf', type = 'rast', name = mapcalc_string_Ba_removal)
+ grass.run_command("g.remove", flags = 'bf', type = 'raster', name = mapcalc_string_Ba_removal)
# Delete basic maps if flag "b" is set
if flags['b']:
- grass.run_command("g.remove", flags = 'bf', type = 'vect', name = output_fidimo + "_source_points")
+ grass.run_command("g.remove", flags = 'bf', type = 'vector', name = output_fidimo + "_source_points")
if options['barriers']:
- grass.run_command("g.remove", flags = 'bf', type = 'vect', name = output_fidimo + "_barriers")
+ grass.run_command("g.remove", flags = 'bf', type = 'vector', name = output_fidimo + "_barriers")
return 0
Modified: grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py
===================================================================
--- grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -108,9 +108,9 @@
# Cleaning up
grass.message("Cleaning up.. ")
grass.run_command('g.remove', quiet = True, flags = 'f',
- type = 'rast', name = 'r_accumulation')
+ type = 'raster', name = 'r_accumulation')
grass.run_command('g.remove', quiet = True, flags = 'f',
- type = 'rast', name = 'r_slope')
+ type = 'raster', name = 'r_slope')
# flood map
grass.message("Calculating flood raster map.. ")
@@ -136,9 +136,9 @@
# Cleaning up
grass.message("Cleaning up.. ")
- grass.run_command('g.remove', flags='f', type='rast', name='r_clump')
- grass.run_command('g.remove', flags='f', type='rast', name='r_flood_th')
- grass.run_command('g.remove', flags='f', type='rast', name='r_flood')
+ grass.run_command('g.remove', flags='f', type='raster', name='r_clump')
+ grass.run_command('g.remove', flags='f', type='raster', name='r_flood_th')
+ grass.run_command('g.remove', flags='f', type='raster', name='r_flood')
grass.message(_('Done.'))
Modified: grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py
===================================================================
--- grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.in.srtm.region/r.in.srtm.region.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -321,8 +321,7 @@
# g.list with sep = comma does not work ???
pattern = '*.r.in.srtm.tmp.%d' % pid
- srtmtiles = grass.read_command('g.list',
- type = 'rast',
+ srtmtiles = grass.read_command('g.list', type = 'raster',
pattern = pattern,
sep = 'newline',
quiet = True)
@@ -331,7 +330,7 @@
srtmtiles = ','.join(srtmtiles)
if valid_tiles == 0:
- grass.run_command('g.remove', type = 'rast', name = str(srtmtiles), flags = 'f', quiet = True)
+ grass.run_command('g.remove', type = 'raster', name = str(srtmtiles), flags = 'f', quiet = True)
grass.warning(_("No tiles imported"))
if local != tmpdir:
grass.fatal(_("Please check if local folder <%s> is correct.") % local)
@@ -349,7 +348,7 @@
grass.run_command('r.patch', input = srtmtiles, output = output + '.holes')
mapstats = grass.parse_command('r.univar', map = output + '.holes', flags = 'g', quiet = True)
if mapstats['null_cells'] == '0':
- grass.run_command('g.rename', rast = '%s,%s' % (output + '.holes', output), quiet = True)
+ grass.run_command('g.rename', raster = '%s,%s' % (output + '.holes', output), quiet = True)
else:
grass.run_command('r.resamp.bspline',
input = output + '.holes',
@@ -364,12 +363,12 @@
output = output + '.float',
flags = 'z')
grass.run_command('r.mapcalc', expression = '%s = round(%s)' % (output, output + '.float'))
- grass.run_command('g.remove', type = 'rast',
+ grass.run_command('g.remove', type = 'raster',
name = '%s,%s,%s' % (output + '.holes', output + '.interp', output + '.float'),
flags = 'f',
quiet = True)
- grass.run_command('g.remove', type = 'rast', pattern = pattern, flags = 'f', quiet = True)
+ grass.run_command('g.remove', type = 'raster', pattern = pattern, flags = 'f', quiet = True)
# nice color table
grass.run_command('r.colors', map = output, color = 'srtm', quiet = True)
Modified: grass-addons/grass7/raster/r.lake.series/r.lake.series.py
===================================================================
--- grass-addons/grass7/raster/r.lake.series/r.lake.series.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.lake.series/r.lake.series.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -145,7 +145,7 @@
def remove_raster_maps(maps, quiet=False):
for map_ in maps:
- gcore.run_command('g.remove', flags='f', type='rast', name=map_, quiet=quiet)
+ gcore.run_command('g.remove', flags='f', type='raster', name=map_, quiet=quiet)
def main():
@@ -217,7 +217,7 @@
overwrite=gcore.overwrite())
# TODO: we must start from 1 because there is a bug in register_maps_in_space_time_dataset
tgis.register_maps_in_space_time_dataset(
- type='rast', name=basename, maps=','.join(outputs),
+ type='raster', name=basename, maps=','.join(outputs),
start=str(1), end=None, unit=time_unit, increment=time_step,
interval=False, dbif=None)
Modified: grass-addons/grass7/raster/r.local.relief/r.local.relief.py
===================================================================
--- grass-addons/grass7/raster/r.local.relief/r.local.relief.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.local.relief/r.local.relief.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -70,9 +70,9 @@
if RREMOVE or VREMOVE:
gcore.info(_("Cleaning temporary maps..."))
for rast in RREMOVE:
- gscript.run_command('g.remove', flags='f', type='rast', name=rast, quiet=True)
+ gscript.run_command('g.remove', flags='f', type='raster', name=rast, quiet=True)
for vect in VREMOVE:
- gscript.run_command('g.remove', flags='f', type='vect', name=vect, quiet=True)
+ gscript.run_command('g.remove', flags='f', type='vector', name=vect, quiet=True)
def create_tmp_map_name(name):
Modified: grass-addons/grass7/raster/r.mcda.input/r.mcda.input.py
===================================================================
--- grass-addons/grass7/raster/r.mcda.input/r.mcda.input.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.mcda.input/r.mcda.input.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -163,8 +163,8 @@
patch_georules(maps,outputMap)
if not flags['l']:
- grass.run_command("g.remove", flags="f", quiet=True, type='rast', name=maplist)
- grass.run_command("g.remove", flags="f", quiet=True, type='vect', name=maplist)
+ grass.run_command("g.remove", flags="f", quiet=True, type='raster', name=maplist)
+ grass.run_command("g.remove", flags="f", quiet=True, type='vector', name=maplist)
input_rules.close()
return 0
Modified: grass-addons/grass7/raster/r.mcda.roughset/r.mcda.roughset.py
===================================================================
--- grass-addons/grass7/raster/r.mcda.roughset/r.mcda.roughset.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.mcda.roughset/r.mcda.roughset.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -557,8 +557,8 @@
grass.run_command("g.copy",vect=(mapslabels,outputMap))
if not flags['l']:
- grass.run_command("g.remove", flags='f', type='rast', name=mapstring)
- grass.run_command("g.remove", flags='f', type='vect', name=mapstring)
+ grass.run_command("g.remove", flags='f', type='raster', name=mapstring)
+ grass.run_command("g.remove", flags='f', type='vector', name=mapstring)
return 0
Modified: grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py
===================================================================
--- grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -142,12 +142,12 @@
if (tmp_map_rast or tmp_map_vect):
# grass.run_command("g.remove",
# flags = 'f',
-# type = 'rast',
+# type = 'raster',
# name = [f + str(os.getpid()) for f in tmp_map_rast],
# quiet = True)
grass.run_command("g.remove",
flags = 'f',
- type = 'vect',
+ type = 'vector',
name = [f + str(os.getpid()) for f in tmp_map_vect],
quiet = True)
Modified: grass-addons/grass7/raster/r.random.weight/r.random.weight.py
===================================================================
--- grass-addons/grass7/raster/r.random.weight/r.random.weight.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.random.weight/r.random.weight.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -83,7 +83,7 @@
def cleanup():
grass.run_command('g.remove',
- type = 'rast',
+ type = 'raster',
name = 'tmp_map',
flags = 'f',
quiet = True)
Modified: grass-addons/grass7/raster/r.random.weight/r.random.weight_legacy.py
===================================================================
--- grass-addons/grass7/raster/r.random.weight/r.random.weight_legacy.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.random.weight/r.random.weight_legacy.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -87,7 +87,7 @@
def cleanup():
grass.run_command('g.remove', flags = 'f',
- type = 'rast', name = tmp_map, quiet = True)
+ type = 'raster', name = tmp_map, quiet = True)
# main function
def main():
Modified: grass-addons/grass7/raster/r.recode.attr/r.recode.attr.py
===================================================================
--- grass-addons/grass7/raster/r.recode.attr/r.recode.attr.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.recode.attr/r.recode.attr.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -56,7 +56,7 @@
def cleanup():
grass.run_command('g.remove',
- type = 'rast',
+ type = 'raster',
pattern = 'tmp_map',
flags='f',
quiet = True)
Modified: grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py
===================================================================
--- grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.rock.stability/r.rock.stability.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -305,7 +305,7 @@
quiet = True)
grass.run_command('g.remove' ,
flags = 'f' ,
- type = 'rast' ,
+ type = 'raster' ,
name = (
'Asci' ,
'Arib' ,
@@ -416,7 +416,7 @@
#elimino mappe
grass.run_command('g.remove' ,
flags = 'f' ,
- type = 'rast' ,
+ type = 'raster' ,
name = (
'slopes_' ,
'aspects_' ,
@@ -453,7 +453,7 @@
else:
grass.run_command('g.remove',
flags = 'f',
- type = 'rast',
+ type = 'raster',
name = (
'slopes_' ,
'aspects_' ,
Modified: grass-addons/grass7/raster/r.roughness.vector/r.roughness.vector.py
===================================================================
--- grass-addons/grass7/raster/r.roughness.vector/r.roughness.vector.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.roughness.vector/r.roughness.vector.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -127,7 +127,7 @@
# cleaning up temp files
def cleanup():
rasts = ['aspect_compass','colat_angle','cosine_x','cosine_y','cosine_z','sum_Xcosine','sum_Ycosine','sum_Zcosine']
- grass.run_command('g.remove', flags = 'bf', type = 'rast', name = rasts, quiet = True)
+ grass.run_command('g.remove', flags = 'bf', type = 'raster', name = rasts, quiet = True)
def main():
Modified: grass-addons/grass7/raster/r.shaded.pca/r.shaded.pca.py
===================================================================
--- grass-addons/grass7/raster/r.shaded.pca/r.shaded.pca.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.shaded.pca/r.shaded.pca.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -102,9 +102,9 @@
if REMOVE or MREMOVE:
core.info(_("Cleaning temporary maps..."))
for rast in REMOVE:
- grass.run_command('g.remove', flags = 'f', type = 'rast', name = rast, quiet=True)
+ grass.run_command('g.remove', flags = 'f', type = 'raster', name = rast, quiet=True)
for pattern in MREMOVE:
- grass.run_command('g.remove', flags = 'f', type = 'rast', pattern ='%s*' % pattern,
+ grass.run_command('g.remove', flags = 'f', type = 'raster', pattern ='%s*' % pattern,
quiet=True)
Modified: grass-addons/grass7/raster/r.shalstab/r.shalstab.py
===================================================================
--- grass-addons/grass7/raster/r.shalstab/r.shalstab.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.shalstab/r.shalstab.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -188,10 +188,10 @@
grass.run_command('r.neighbors', input='Icritica', method='average',
size=3, output='I_cri_average')
# rename maps
- grass.run_command('g.rename', rast=("I_cri_average", susceptibility))
- grass.run_command('g.rename', rast=("i_cri_mm", critic_rain))
+ grass.run_command('g.rename', raster = ("I_cri_average", susceptibility))
+ grass.run_command('g.rename', raster = ("i_cri_mm", critic_rain))
# remove temporary map
- grass.run_command('g.remove', flags='f', type='rast', name=("A",
+ grass.run_command('g.remove', flags='f', type='raster', name=("A",
"copia_reclass",
"i_crit_m",
"i_recl",
Modified: grass-addons/grass7/raster/r.skyview/r.skyview.py
===================================================================
--- grass-addons/grass7/raster/r.skyview/r.skyview.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.skyview/r.skyview.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -63,7 +63,7 @@
def cleanup():
if CLEANUP:
- gcore.run_command('g.remove', flags='f', type='rast',
+ gcore.run_command('g.remove', flags='f', type='raster',
pattern=TMP_NAME + "*")
Modified: grass-addons/grass7/raster/r.soillossbare/r.soillossbare.py
===================================================================
--- grass-addons/grass7/raster/r.soillossbare/r.soillossbare.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.soillossbare/r.soillossbare.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -217,7 +217,7 @@
try:
g.run_command('g.remove',
flags = 'f',
- type = 'rast',
+ type = 'raster',
name = tmprast,
quiet = True)
except CalledModuleError:
Modified: grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py
===================================================================
--- grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.sun.daily/r.sun.daily.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -152,10 +152,10 @@
if REMOVE or MREMOVE:
core.info(_("Cleaning temporary maps..."))
for rast in REMOVE:
- grass.run_command('g.remove', type='rast', name=rast, flags='f',
+ grass.run_command('g.remove', type='raster', name=rast, flags='f',
quiet=True)
for pattern in MREMOVE:
- grass.run_command('g.remove', type='rast', pattern='%s*' % pattern,
+ grass.run_command('g.remove', type='raster', pattern='%s*' % pattern,
flags='f', quiet=True)
@@ -405,7 +405,7 @@
semantic='sum', dbif=None,
overwrite=grass.overwrite())
tgis.register_maps_in_space_time_dataset(
- type='rast', name=basename, maps=maps, start=start_day, end=None,
+ type='raster', name=basename, maps=maps, start=start_day, end=None,
unit='days', increment=day_step, dbif=None, interval=False)
# Make sure the temporal database exists
tgis.init()
Modified: grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py
===================================================================
--- grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.sun.hourly/r.sun.hourly.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -146,7 +146,7 @@
if len(TMP):
core.info(_("Cleaning %d temporary maps...") % len(TMP))
for rast in TMP:
- grass.run_command('g.remove', type='rast', name=rast, flags='f',
+ grass.run_command('g.remove', type='raster', name=rast, flags='f',
quiet=True)
@@ -194,7 +194,7 @@
exp='{out} = if({inp} > 0, 1, 0)'.format(out=output + suffix + binaryTmpName,
inp=output + suffix)
grass.mapcalc(exp=exp, overwrite=core.overwrite())
- grass.run_command('g.rename', rast=[output + suffix + binaryTmpName,
+ grass.run_command('g.rename', raster = [output + suffix + binaryTmpName,
output + suffix],
overwrite=True)
@@ -385,7 +385,7 @@
semantic='mean', dbif=None,
overwrite=grass.overwrite())
tgis.register_maps_in_space_time_dataset(
- type='rast', name=basename, maps=maps, start=start_time,
+ type='raster', name=basename, maps=maps, start=start_time,
end=None, increment=time_step, dbif=None, interval=False)
# Make sure the temporal database exists
tgis.init()
Modified: grass-addons/grass7/raster/r.to.vect.tiled/r.to.vect.tiled.py
===================================================================
--- grass-addons/grass7/raster/r.to.vect.tiled/r.to.vect.tiled.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.to.vect.tiled/r.to.vect.tiled.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -211,14 +211,14 @@
outname = output + '_tile_' + str(ytile) + str(xtile)
grass.run_command('v.overlay', ainput = tilename, binput = extname,
output = outname, operator = 'and', olayer = '0,1,0')
- grass.run_command('g.remove', flags='f', type='vect', name= extname, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= extname, quiet = True)
if vtiles is None:
vtiles = outname
else:
vtiles = vtiles + ',' + outname
- grass.run_command('g.remove', flags='f', type='vect', name= tilename, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= tilename, quiet = True)
else:
# write cmd history:
@@ -232,14 +232,14 @@
grass.run_command('v.patch', input = vtiles, output = output,
flags = 'e')
- grass.run_command('g.remove', flags='f', type='vect', name= vtiles, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vector', name= vtiles, quiet = True)
if grass.vector_info_topo(output)['boundaries'] > 0:
outpatch = output + '_patch'
- grass.run_command('g.rename', vect = (output,outpatch))
+ grass.run_command('g.rename', vector = (output,outpatch))
grass.run_command('v.clean', input = outpatch, output = output,
tool = 'break', flags = 'c')
- grass.run_command('g.remove', flags='f', type='vect', name= outpatch)
+ grass.run_command('g.remove', flags='f', type='vector', name= outpatch)
grass.message(_("%s complete") % 'r.to.vect.tiled')
Modified: grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py
===================================================================
--- grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -325,7 +325,7 @@
grass.message( "..." )
- grass.run_command('g.remove', flags='f', type='rast', name= "DEM_smoothed_step3_slope_degree",
+ grass.run_command('g.remove', flags='f', type='raster', name= "DEM_smoothed_step3_slope_degree",
quiet = True)
grass.message( "Step 3: Calculation of slope done." )
grass.message( "----" )
@@ -506,7 +506,7 @@
grass.message( "..." )
- grass.run_command('g.remove', flags='f', type='rast', name= "DEM_smoothed_step4_slope_degree",
+ grass.run_command('g.remove', flags='f', type='raster', name= "DEM_smoothed_step4_slope_degree",
quiet = True)
grass.message( "Step 4: Calculation of slope done." )
grass.message( "----" )
@@ -649,21 +649,21 @@
grass.message( "Some clean up ..." )
grass.run_command('g.remove', region = "base_region_MrVBF",
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["F1,F2,F3,F4"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["F1,F2,F3,F4"],
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["CF2,CF3,CF4"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["CF2,CF3,CF4"],
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["PCTL1,PCTL2,PCTL3,PCTL3_refined_base_resolution,PCTL4,PCTL4_refined_base_resolution"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["PCTL1,PCTL2,PCTL3,PCTL3_refined_base_resolution,PCTL4,PCTL4_refined_base_resolution"],
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["PVF1,PVF2,PVF3,PVF4"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["PVF1,PVF2,PVF3,PVF4"],
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["VF1,VF2,VF3,VF4"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["VF1,VF2,VF3,VF4"],
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["W2,W3,W4"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["W2,W3,W4"],
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["r_slope_step1,r_slope_step3,r_slope_step4,r_slope_step4_refined_base_resolution"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["r_slope_step1,r_slope_step3,r_slope_step4,r_slope_step4_refined_base_resolution"],
quiet = True)
- grass.run_command('g.remove', flags='f', type='rast', name= ["DEM_smoothed_step3,DEM_smoothed_step3_coarsed,DEM_smoothed_step4,DEM_smoothed_step4_coarsed"],
+ grass.run_command('g.remove', flags='f', type='raster', name= ["DEM_smoothed_step3,DEM_smoothed_step3_coarsed,DEM_smoothed_step4,DEM_smoothed_step4_coarsed"],
quiet = True)
grass.message( "Clean up done." )
Modified: grass-addons/grass7/vector/v.area.weigh/v.area.weigh.py
===================================================================
--- grass-addons/grass7/vector/v.area.weigh/v.area.weigh.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.area.weigh/v.area.weigh.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -43,11 +43,11 @@
def cleanup():
if rastertmp1:
- grass.run_command('g.remove', flags='f', type='rast', name= rastertmp1, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= rastertmp1, quiet = True)
if rastertmp2:
- grass.run_command('g.remove', flags='f', type='rast', name= rastertmp2, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= rastertmp2, quiet = True)
if rastertmp3:
- grass.run_command('g.remove', flags='f', type='rast', name= rastertmp3, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= rastertmp3, quiet = True)
def main():
global tmp, tmpname, rastertmp1, rastertmp2, rastertmp3
Modified: grass-addons/grass7/vector/v.centerline/v.centerline.py
===================================================================
--- grass-addons/grass7/vector/v.centerline/v.centerline.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.centerline/v.centerline.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -63,15 +63,15 @@
def cleanup():
if grass.find_file(tmp_points_map, element='vector')['name']:
- grass.run_command('g.remove', flags='f', type='vect', name=tmp_points_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vector', name=tmp_points_map, quiet=True)
if grass.find_file(tmp_line_map, element='vector')['name']:
- grass.run_command('g.remove', flags='f', type='vect', name=tmp_line_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vector', name=tmp_line_map, quiet=True)
if grass.find_file(tmp_cleaned_map, element='vector')['name']:
- grass.run_command('g.remove', flags='f', type='vect', name=tmp_cleaned_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vector', name=tmp_cleaned_map, quiet=True)
if grass.find_file(tmp_centerpoints_map, element='vector')['name']:
- grass.run_command('g.remove', flags='f', type='vect', name=tmp_centerpoints_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vector', name=tmp_centerpoints_map, quiet=True)
if grass.find_file(tmp_map, element='vector')['name']:
- grass.run_command('g.remove', flags='f', type='vect', name=tmp_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vector', name=tmp_map, quiet=True)
def main():
Modified: grass-addons/grass7/vector/v.civil/v.civil.road/v.civil.road.py
===================================================================
--- grass-addons/grass7/vector/v.civil/v.civil.road/v.civil.road.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.civil/v.civil.road/v.civil.road.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -3222,9 +3222,9 @@
driver = f['driver']
#g.message(_("Creating backup"))
- #g.run_command('g.rename', vect=NameMap+"_old"+","+NameMap+"_old2")
- #g.run_command('g.copy', vect=NameMap+","+NameMap+"_old")
- #g.run_command('g.remove', flags='bf', type='vect', name=NameMap+"_old2")
+ #g.run_command('g.rename', vector = NameMap+"_old"+","+NameMap+"_old2")
+ #g.run_command('g.copy', vector = NameMap+","+NameMap+"_old")
+ #g.run_command('g.remove', flags='bf', type='vector', name=NameMap+"_old2")
#g.message(_("Finish backup"))
@@ -3396,7 +3396,7 @@
if Desplaz_Areas != []:
write_Polygonos(Desplaz_Areas, NameMap+"_tmp2", 0)
g.run_command('v.centroids', input=NameMap+"_tmp2", output=name1, overwrite=True, quiet=True)
- g.run_command('g.remove', flags='f', type='vect', name=NameMap+"_tmp2", quiet=True)
+ g.run_command('g.remove', flags='f', type='vector', name=NameMap+"_tmp2", quiet=True)
if flags['c']:
@@ -3507,12 +3507,12 @@
if Areas_Desm != []:
write_Polygonos(Areas_Desm, NameMap+"_tmp3", 0)
g.run_command('v.centroids', input=NameMap+"_tmp3", output=name1+'_Cut', overwrite=True, quiet=True)
- g.run_command('g.remove', flags='f', type='vect', name=NameMap+"_tmp3", quiet=True)
+ g.run_command('g.remove', flags='f', type='vector', name=NameMap+"_tmp3", quiet=True)
if Areas_Terr != []:
write_Polygonos(Areas_Terr, NameMap+"_tmp3", 0)
g.run_command('v.centroids', input=NameMap+"_tmp3", output=name1+'_Fill', overwrite=True, quiet=True)
- g.run_command('g.remove', flags='f', type='vect', name=NameMap+"_tmp3", quiet=True)
+ g.run_command('g.remove', flags='f', type='vector', name=NameMap+"_tmp3", quiet=True)
if flags['p']:
@@ -3583,7 +3583,7 @@
g.run_command('v.centroids', input=NameMap+"_tmp1", output=name1, overwrite=True, quiet=True)
#g.run_command('v.to.rast', input=NameMap+"_Contorno", output=options['outhull'], use='val', overwrite=True, quiet=True)
- g.run_command('g.remove', flags='f', type='vect', name=NameMap+"_tmp1", quiet=True)
+ g.run_command('g.remove', flags='f', type='vector', name=NameMap+"_tmp1", quiet=True)
##################################################################
Modified: grass-addons/grass7/vector/v.civil/v.civil.topo/v.civil.topo.py
===================================================================
--- grass-addons/grass7/vector/v.civil/v.civil.topo/v.civil.topo.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.civil/v.civil.topo/v.civil.topo.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -583,7 +583,7 @@
os.system("r.mapcalc '"+nameTinDem+" = if("+HullMap+"==1"+", "+OutName+"_TinDem_borrar"+", null())' --o --q")
grass.run_command('r.contour', input=nameTinDem, output=nameTinDemC, step=options['step'], overwrite=True, quiet=True)
- grass.run_command('g.remove', flags='f', type='rast', name=OutName+"_TinDem_borrar")
+ grass.run_command('g.remove', flags='f', type='raster', name=OutName+"_TinDem_borrar")
if flags['y']:
grass.message("Triangulating nnbathy")
@@ -595,7 +595,7 @@
os.system("r.mapcalc '"+nameNNDem+" = if("+HullMap+"==1"+", "+OutName+"_NNbathyDem_borrar"+", null())' --o --q")
grass.run_command('r.contour', input=nameNNDem, output=nameNNDemC, step=options['step'], overwrite=True, quiet=True)
- grass.run_command('g.remove', flags='f', type='rast', name=OutName+"_NNbathyDem_borrar")
+ grass.run_command('g.remove', flags='f', type='raster', name=OutName+"_NNbathyDem_borrar")
if flags['f']:
grass.message("Patching timdem with dem")
Modified: grass-addons/grass7/vector/v.colors2/v.colors2.py
===================================================================
--- grass-addons/grass7/vector/v.colors2/v.colors2.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.colors2/v.colors2.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -94,7 +94,7 @@
if tmp_vcol:
grass.try_remove(tmp_vcol)
if tmp_colr:
- grass.run_command('g.remove', flags='f', type='rast', name= tmp_colr, quiet = True)
+ grass.run_command('g.remove', flags='f', type='raster', name= tmp_colr, quiet = True)
def main():
color = options['color']
@@ -255,7 +255,7 @@
if flags['s']:
vcolors = "vcolors_%d" % pid
- grass.run_command('g.rename', rast = (tmp_colr, vcolors), quiet = True)
+ grass.run_command('g.rename', raster = (tmp_colr, vcolors), quiet = True)
grass.message(_("Raster map containing color rules saved to <%s>") % vcolors)
# TODO save full v.colors command line history
grass.run_command('r.support', map = vcolors,
Modified: grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py
===================================================================
--- grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -42,7 +42,7 @@
def cleanup():
for ext in ['', '.sort']:
grass.try_remove(tmp + ext)
- grass.run_command('g.remove', flags = 'f', type = 'vect', pattern = prefix + '_*', quiet = True)
+ grass.run_command('g.remove', flags = 'f', type = 'vector', pattern = prefix + '_*', quiet = True)
def sortfile(infile, outfile):
inf = file(infile, 'r')
Modified: grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py
===================================================================
--- grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -253,7 +253,7 @@
# if number of form is different from 0 and number of point
# remove the vector because some form it is different
if len(forms) != 0 and len(forms) != len(pois):
- grass.run_command('g.remove', flags='f', type='vect', name=catname, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vector', name=catname, quiet=True)
grass.warning(_("Vector %s not imported because number" \
" of points and form is different"))
# if form it's 0 there is no form
Modified: grass-addons/grass7/vector/v.isochrones/v.isochrones.py
===================================================================
--- grass-addons/grass7/vector/v.isochrones/v.isochrones.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.isochrones/v.isochrones.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -88,13 +88,13 @@
quiet=True)
if grass.find_file(tmp_cost_map, element='raster')['name']:
- grass.run_command('g.remove', flags='f', type='rast', name=tmp_cost_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='raster', name=tmp_cost_map, quiet=True)
if grass.find_file(tmp_map, element='raster')['name']:
- grass.run_command('g.remove', flags='f', type='rast', name=tmp_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='raster', name=tmp_map, quiet=True)
if grass.find_file(tmp_time_map, element='raster')['name']:
- grass.run_command('g.remove', flags='f', type='rast', name=tmp_time_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='raster', name=tmp_time_map, quiet=True)
if grass.find_file(tmp_region_map, element='raster')['name']:
- grass.run_command('g.remove', flags='f', type='rast', name=tmp_region_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='raster', name=tmp_region_map, quiet=True)
def main():
@@ -172,7 +172,7 @@
expression = tmp_time_map + ' = ' + tmp_map + ' / 3600'
grass.mapcalc(expression)
else:
- grass.run_command('g.rename', rast=(tmp_map, tmp_time_map))
+ grass.run_command('g.rename', raster = (tmp_map, tmp_time_map))
if timemap:
grass.run_command('g.copy', rast=(tmp_time_map, timemap))
Modified: grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py
===================================================================
--- grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -103,7 +103,7 @@
def cleanup():
nuldev = file(os.devnull, 'w')
- grass.run_command('g.remove', flags='f', type='vect', name= '%s,%s,%s' % (temp_ng, temp_ncin, temp_ncout), quiet = True, stderr = nuldev)
+ grass.run_command('g.remove', flags='f', type='vector', name= '%s,%s,%s' % (temp_ng, temp_ncin, temp_ncout), quiet = True, stderr = nuldev)
def main():
global temp_ng, temp_ncin, temp_ncout
@@ -211,8 +211,8 @@
ng=grass.vector_info(temp_ng)['points']
nc = n_input - ng
n_input = nc
- grass.run_command('g.remove', flags='f', type='vect', name= temp_ncin, quiet = True, stderr = nuldev)
- grass.run_command("g.rename", vect=temp_ncout + "," + temp_ncin, quiet = True, stderr = nuldev )
+ grass.run_command('g.remove', flags='f', type='vector', name= temp_ncin, quiet = True, stderr = nuldev)
+ grass.run_command("g.rename", vector = temp_ncout + "," + temp_ncin, quiet = True, stderr = nuldev )
nc_points = temp_ncin
# Give information on process status
grass.verbose("Unclassified points after iteration " + str(i) + ": " + str(nc) )
@@ -235,7 +235,7 @@
grass.del_temp_region()
# Rename temporary map of points whichhave not been classified as non-ground to output vector map containing ground points
- grass.run_command("g.rename", vect=nc_points + "," + g_output, quiet = True, stderr = nuldev )
+ grass.run_command("g.rename", vector = nc_points + "," + g_output, quiet = True, stderr = nuldev )
if __name__ == "__main__":
options, flags = grass.parser()
Modified: grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py
===================================================================
--- grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -56,7 +56,7 @@
option='add', layer=blayer, type='boundary', quiet=True)
vtodb_results=grass.read_command('v.to.db', flags='p', map=tempmapname,
type='boundary', option='sides', layer=blayer, qlayer=player, quiet=True)
- grass.run_command('g.remove', flags='f', type='vect', name=tempmapname, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vector', name=tempmapname, quiet=True)
#put result into a list of integer pairs
temp_neighbors=[]
Modified: grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py
===================================================================
--- grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -130,7 +130,7 @@
def cleanup():
grass.verbose(_("Cleanup.."))
tmp_base = 'tmp_icw_' + str(os.getpid()) + '_'
- grass.run_command('g.remove', flags = 'f', type = 'rast', pattern = tmp_base + '*',
+ grass.run_command('g.remove', flags = 'f', type = 'raster', pattern = tmp_base + '*',
quiet = True)
@@ -320,7 +320,7 @@
for i in range(n):
cost_site_name = tmp_base + 'cost_site.' + '%05d' % (i+1)
grass.run_command('g.remove', flags = 'f', rast = cost_site_name, quiet = True)
- grass.run_command('g.rename', rast = cost_site_name + '.cleansed'
+ grass.run_command('g.rename', raster = cost_site_name + '.cleansed'
+ ',' + cost_site_name, quiet = True)
# r.to.vect then r.patch output
@@ -358,9 +358,9 @@
if proc[i].wait() is not 0:
grass.fatal(_('Problem running %s') % 'r.mapcalc')
- grass.run_command('g.remove', flags = 'f', type = 'rast',
+ grass.run_command('g.remove', flags = 'f', type = 'raster',
pattern = tmp_base + 'cost_site.*', quiet = True)
- #grass.run_command('g.list', type = 'rast', mapset = '.')
+ #grass.run_command('g.list', type = 'raster', mapset = '.')
#######################################################
@@ -380,7 +380,7 @@
for i in range(2, n+1):
input_maps += ',%s1by_cost_site_sq.%05d' % (tmp_base, i)
- #grass.run_command('g.list', type = 'rast', mapset = '.')
+ #grass.run_command('g.list', type = 'raster', mapset = '.')
sum_of_1by_cost_sqs = tmp_base + 'sum_of_1by_cost_sqs'
try:
@@ -446,7 +446,7 @@
proc[num-1].wait()
# free up disk space ASAP
- #grass.run_command('g.remove', flags = 'f', type = 'rast', name = one_by_cost_site_sq, quiet = True)
+ #grass.run_command('g.remove', flags = 'f', type = 'raster', name = one_by_cost_site_sq, quiet = True)
num += 1
if num > n:
@@ -459,7 +459,7 @@
# free up disk space ASAP
grass.run_command('g.remove', flags = 'f',
rast = tmp_base + '1by_cost_site_sq.*', quiet = True)
- #grass.run_command('g.list', type = 'rast', mapset = '.')
+ #grass.run_command('g.list', type = 'raster', mapset = '.')
#######################################################
Modified: grass-addons/grass7/vector/v.transects/v.transects.py
===================================================================
--- grass-addons/grass7/vector/v.transects/v.transects.py 2014-12-20 17:20:37 UTC (rev 63653)
+++ grass-addons/grass7/vector/v.transects/v.transects.py 2014-12-20 20:07:43 UTC (rev 63654)
@@ -64,12 +64,12 @@
rand_number = [random.randint(0, 9) for i in range(6)]
rand_number_str = ''.join(map(str, rand_number))
mapname = 'temp_' + rand_number_str
- maplist = grass.read_command('g.list', type='vect', mapset='.').split()
+ maplist = grass.read_command('g.list', type='vector', mapset='.').split()
while mapname in maplist:
rand_number = [random.randint(0, 9) for i in range(6)]
rand_number_str = ''.join(map(str, rand_number))
mapname = 'temp_' + rand_number_str
- maplist = grass.read_command('g.list', type='vect', mapset='.').split()
+ maplist = grass.read_command('g.list', type='vector', mapset='.').split()
return mapname
@@ -292,7 +292,7 @@
grass.run_command('v.category', input=temp_map, output=output,
option='add', type=shape)
- grass.run_command('g.remove', flags='f', type='vect', name=temp_map)
+ grass.run_command('g.remove', flags='f', type='vector', name=temp_map)
if __name__ == "__main__":
options, flags = grass.parser()
More information about the grass-commit
mailing list