[GRASS-SVN] r62455 - in grass-addons/grass7: imagery/i.histo.match raster/r.basin raster/r.bioclim raster/r.edm.eval raster/r.fidimo raster/r.forestfrag raster/r.hazard.flood raster/r.lake.series raster/r.lfp raster/r.local.relief raster/r.northerness.easterness raster/r.shaded.pca raster/r.shalstab raster/r.skyview raster/r.to.vect.tiled raster/r.valley.bottom raster/r.vif 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.habitat.dem vector/v.in.geopaparazzi vector/v.isochrones vector/v.lidar.mcc vector/v.neighborhoodmatrix vector/v.surf.icw vector/v.to.lines vector/v.transects
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 28 15:32:43 PDT 2014
Author: neteler
Date: 2014-10-28 15:32:43 -0700 (Tue, 28 Oct 2014)
New Revision: 62455
Modified:
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.edm.eval/r.edm.eval
grass-addons/grass7/raster/r.fidimo/r.fidimo.py
grass-addons/grass7/raster/r.forestfrag/r.forestfrag
grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py
grass-addons/grass7/raster/r.lake.series/r.lake.series.py
grass-addons/grass7/raster/r.lfp/r.lfp.py
grass-addons/grass7/raster/r.local.relief/r.local.relief.py
grass-addons/grass7/raster/r.northerness.easterness/r.northerness.easterness.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.to.vect.tiled/r.to.vect.tiled.py
grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py
grass-addons/grass7/raster/r.vif/r.vif
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.habitat.dem/v.habitat.dem.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.to.lines/v.to.lines.py
grass-addons/grass7/vector/v.transects/v.transects.py
Log:
Addons: update to new g.remove interface (former g.mremove)
Modified: grass-addons/grass7/imagery/i.histo.match/i.histo.match.py
===================================================================
--- grass-addons/grass7/imagery/i.histo.match/i.histo.match.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/imagery/i.histo.match/i.histo.match.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -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', rast=outname)
+ grass.run_command('g.remove', flags='f', type='rast', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.basin/r.basin.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -199,7 +199,7 @@
r_accumulation = r_accumulation,
r_mask = r_mask)
- grass.run_command('g.remove', rast = r_accumulation, quiet = True)
+ grass.run_command('g.remove', flags='f', type='rast', name= r_accumulation, quiet = True)
grass.run_command('g.rename', rast = ('tmp',r_accumulation))
@@ -207,7 +207,7 @@
r_drainage = r_drainage,
r_mask = r_mask)
- grass.run_command('g.remove', rast = r_drainage, quiet = True)
+ grass.run_command('g.remove', flags='f', type='rast', name= r_drainage, quiet = True)
grass.run_command('g.rename', rast = ('tmp', r_drainage))
@@ -221,7 +221,7 @@
r_mask = r_mask,
r_drainage_e = r_drainage_e)
- grass.run_command('g.remove', rast = r_drainage_e, quiet = True)
+ grass.run_command('g.remove', flags='f', type='rast', name= r_drainage_e, quiet = True)
grass.run_command('g.rename', rast = ('tmp',r_drainage_e))
@@ -229,7 +229,7 @@
r_mask = r_mask,
r_stream_e = r_stream_e)
- grass.run_command('g.remove', rast = r_stream_e, quiet = True)
+ 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.rename', rast = ('tmp',r_stream_e))
@@ -602,40 +602,40 @@
drainage_density = float(Len_streams) / float(area_basin)
# Cleaning up
- grass.run_command('g.remove', rast = 'r_elevation_crop', quiet = True)
- grass.run_command('g.remove', rast = r_height_average, quiet = True)
- grass.run_command('g.remove', rast = r_aspect_mod, quiet = True)
- grass.run_command('g.remove', rast = r_mainchannel, quiet = True)
- grass.run_command('g.remove', rast = r_stream_e, quiet = True)
- grass.run_command('g.remove', rast = r_drainage_e, quiet = True)
- grass.run_command('g.remove', rast = r_mask, quiet = True)
- grass.run_command('g.remove', rast = r_ord_1, quiet = True)
- grass.run_command('g.remove', rast = r_average_hillslope, quiet = True)
- grass.run_command('g.remove', rast = r_mainchannel_dim, quiet = True)
- grass.run_command('g.remove', rast = r_outlet, quiet = True)
- grass.run_command('g.remove', rast = r_basin, quiet = True)
- grass.run_command('g.remove', rast = prefix+'_mainchannel_thin', quiet = True)
- grass.run_command('g.remove', rast = prefix+'_mainchannel_dim_thin', quiet = True)
- grass.run_command('g.remove', rast = prefix+'_ord_1_thin', quiet = True)
- grass.run_command('g.remove', rast = prefix+'_stream_e_thin', quiet = True)
- grass.run_command('g.remove', vect = v_mainchannel_dim+'_point', quiet = True)
- grass.run_command('g.remove', vect = v_mainchannel_dim, quiet = True)
- grass.run_command('g.remove', vect = v_ord_1, quiet = True)
+ 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)
if nomap :
- grass.run_command('g.remove', vect = v_outlet, quiet = True)
- grass.run_command('g.remove', vect = v_basin, quiet = True)
- grass.run_command('g.remove', vect = v_mainchannel, quiet = True)
- grass.run_command('g.remove', rast = r_accumulation, quiet = True)
- grass.run_command('g.remove', rast = r_drainage, quiet = True)
- grass.run_command('g.remove', rast = r_aspect, quiet = True)
- grass.run_command('g.remove', rast = r_strahler, quiet = True)
- grass.run_command('g.remove', rast = r_shreve, quiet = True)
- grass.run_command('g.remove', rast = r_horton, quiet = True)
- grass.run_command('g.remove', rast = r_hack, quiet = True)
- grass.run_command('g.remove', rast = r_distance, quiet = True)
- grass.run_command('g.remove', rast = r_hillslope_distance, quiet = True)
- grass.run_command('g.remove', rast = r_slope, quiet = True)
+ 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)
####################################################
Modified: grass-addons/grass7/raster/r.bioclim/r.bioclim.py
===================================================================
--- grass-addons/grass7/raster/r.bioclim/r.bioclim.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.bioclim/r.bioclim.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -79,7 +79,7 @@
def cleanup():
if tmp:
- grass.run_command('g.mremove', type = 'rast', pattern = tmp, flags = 'f', quiet = True)
+ grass.run_command('g.remove', flags = 'f', type = 'rast', pattern = tmp, quiet = True)
def main():
tavg = options['tavg']
@@ -162,7 +162,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', rast = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
# BIO2 = Mean Diurnal Range (Mean of monthly (max temp - min temp))
grass.message(_("BIO2 = Mean Diurnal Range ..."))
@@ -204,8 +204,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', rast = output, quiet = True);
- grass.run_command('g.mremove', type = 'rast', pattern = '%s.tr??.%d' % (outpre, pid), flags = 'f', quiet = True)
+ 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)
# BIO4 = Temperature Seasonality (standard deviation * 100)
grass.message(_("BIO4 = Temperature Seasonality ..."))
@@ -219,7 +219,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', rast = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
# BIO5 = Max Temperature of Warmest Month
grass.message(_("BIO5 = Max Temperature of Warmest Month ..."))
@@ -233,7 +233,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', rast = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
# BIO6 = Min Temperature of Coldest Month
grass.message(_("BIO6 = Min Temperature of Coldest Month ..."))
@@ -247,7 +247,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', rast = output, quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = output, quiet = True);
# BIO7 = Temperature Annual Range (BIO5-BIO6)
grass.message(_("BIO7 = Temperature Annual Range ..."))
@@ -313,11 +313,11 @@
grass.run_command('r.support', map = outpre + '.bio11',
description = 'BIOCLIM11: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio11',history = os.environ['CMDLINE'])
- grass.run_command('g.remove', rast = "%s,%s" % (bio10, bio11), quiet = True);
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = "%s,%s" % (bio10, bio11), quiet = True);
if not prec:
- grass.run_command('g.mremove', type = 'rast', pattern = tmp, flags = 'f', quiet = True)
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = tmp, quiet = True)
sys.exit(1)
precl = prec.split(',')
@@ -482,7 +482,7 @@
description = 'BIOCLIM19: Generated by r.bioclim')
grass.run_command('r.support', map = outpre + '.bio19',history = os.environ['CMDLINE'])
- grass.run_command('g.mremove', type = 'rast', pattern = tmp, flags = 'f', quiet = True)
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = tmp, quiet = True)
if __name__ == "__main__":
Modified: grass-addons/grass7/raster/r.edm.eval/r.edm.eval
===================================================================
--- grass-addons/grass7/raster/r.edm.eval/r.edm.eval 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.edm.eval/r.edm.eval 2014-10-28 22:32:43 UTC (rev 62455)
@@ -398,7 +398,7 @@
# this is a temporary fix!
aa <- execGRASS("g.list", type="rast", pattern="tmp_r_model_evaluation_*", intern=TRUE)
if(length(aa)>0){
- execGRASS("g.mremove", rast="tmp_r_model_evaluation_*", flags="f")
+ execGRASS("g.remove", type="rast", pattern="tmp_r_model_evaluation_*", flags="f")
}
# Calculate evaluation stats
Modified: grass-addons/grass7/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -761,7 +761,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", rast = "density_from_point_unmasked_tmp_%d" % os.getpid())
+ grass.run_command("g.remove", flags="f", type="rast", name= "density_from_point_unmasked_tmp_%d" % os.getpid())
x1 = garray.array()
x1.read("lower_distance_tmp_%d" % os.getpid())
@@ -993,7 +993,7 @@
density_segment = "density_segment_"+segment_cat,
mapcalc_string_Aa_aggregate = mapcalc_string_Aa_aggregate,
overwrite = True)
- grass.run_command("g.remove", rast = mapcalc_string_Aa_removal, flags ="f")
+ grass.run_command("g.remove", flags="f", type="rast", 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
@@ -1006,7 +1006,7 @@
realised_density_segment = "realised_density_segment_"+segment_cat,
mapcalc_string_Ab_aggregate = mapcalc_string_Ab_aggregate,
overwrite = True)
- grass.run_command("g.remove", rast = mapcalc_string_Ab_removal, flags ="f")
+ grass.run_command("g.remove", flags="f", type="rast", 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)
@@ -1037,7 +1037,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", rast = mapcalc_string_Bb_removal, flags ="f")
+ grass.run_command("g.remove", flags="f", type="rast", name=mapcalc_string_Bb_removal)
# backtransformation (divide by scalar which was defined before)
grass.mapcalc("$density_final_corrected = $density_final/$scalar",
@@ -1053,7 +1053,7 @@
grass.run_command("r.null", map=output_fidimo+"_"+i, setnull="0")
- grass.run_command("g.remove", rast = mapcalc_string_Ba_removal, flags ="f")
+ grass.run_command("g.remove", flags="f", type="rast", name=mapcalc_string_Ba_removal)
# Delete basic maps if flag "b" is set
Modified: grass-addons/grass7/raster/r.forestfrag/r.forestfrag
===================================================================
--- grass-addons/grass7/raster/r.forestfrag/r.forestfrag 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.forestfrag/r.forestfrag 2014-10-28 22:32:43 UTC (rev 62455)
@@ -17,7 +17,7 @@
# size of the moving window determined by the user. For now
# it does not work on GRASS 6.4. Use r.forestfrag.sh instead.
#
-# COPYRIGHT: (C) 1997-2013 by the GRASS Development Team
+# COPYRIGHT: (C) 1997-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
@@ -324,7 +324,7 @@
fi
echo "Deleting temporary files ...."
-g.mremove -f -b --quiet rast=${tmpl}*
+g.remove -f -b --quiet type=rast pattern=${tmpl}*
#=======================================================================
# computing fragmentation index
@@ -359,9 +359,9 @@
echo " "
fi
-g.remove rast=${tmpl}_REPORT --quiet
+g.remove -f type=rast name=${tmpl}_REPORT --quiet
g.region region=rforestfrag987654321
-g.remove --quiet region=rforestfrag987654321
+g.remove --quiet -f type=region name=rforestfrag987654321
Modified: grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py
===================================================================
--- grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -134,9 +134,9 @@
# Cleaning up
grass.message("Cleaning up.. ")
- grass.run_command('g.remove', rast = 'r_clump')
- grass.run_command('g.remove', rast = 'r_flood_th')
- grass.run_command('g.remove', rast = 'r_flood')
+ 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.message(_('Done.'))
Modified: grass-addons/grass7/raster/r.lake.series/r.lake.series.py
===================================================================
--- grass-addons/grass7/raster/r.lake.series/r.lake.series.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.lake.series/r.lake.series.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -144,7 +144,7 @@
def remove_raster_maps(maps, quiet=False):
for map_ in maps:
- gcore.run_command('g.remove', rast=map_, quiet=quiet)
+ gcore.run_command('g.remove', flags='f', type='rast', name=map_, quiet=quiet)
def main():
Modified: grass-addons/grass7/raster/r.lfp/r.lfp.py
===================================================================
--- grass-addons/grass7/raster/r.lfp/r.lfp.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.lfp/r.lfp.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -91,7 +91,7 @@
expression="%s=if(%s>=%f, 1, null())" % (output, fldsus, min)) != 0:
grass.fatal(_("Cannot create longest flow path raster map"))
- grass.run_command("g.mremove", flags="f",
+ grass.run_command("g.remove", flags="f",
type="rast,vect", pattern="%s*" % prefix)
if __name__ == "__main__":
Modified: grass-addons/grass7/raster/r.local.relief/r.local.relief.py
===================================================================
--- grass-addons/grass7/raster/r.local.relief/r.local.relief.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.local.relief/r.local.relief.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -70,9 +70,9 @@
if RREMOVE or VREMOVE:
gcore.info(_("Cleaning temporary maps..."))
for rast in RREMOVE:
- gscript.run_command('g.remove', rast=rast, quiet=True)
+ gscript.run_command('g.remove', flags='f', type='rast', name=rast, quiet=True)
for vect in VREMOVE:
- gscript.run_command('g.remove', vect=vect, quiet=True)
+ gscript.run_command('g.remove', flags='f', type='vect', name=vect, quiet=True)
def create_tmp_map_name(name):
Modified: grass-addons/grass7/raster/r.northerness.easterness/r.northerness.easterness.py
===================================================================
--- grass-addons/grass7/raster/r.northerness.easterness/r.northerness.easterness.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.northerness.easterness/r.northerness.easterness.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -114,11 +114,11 @@
# clean up some temporay files and maps
grass.message( "Some clean up ..." )
- grass.run_command("g.remove", rast = r_slope,
+ grass.run_command("g.remove", flags="f", type="rast", name= r_slope,
quiet = True)
- grass.run_command("g.remove", rast = r_aspect,
+ grass.run_command("g.remove", flags="f", type="rast", name= r_aspect,
quiet = True)
- grass.run_command("g.remove", rast = r_aspect_compass,
+ grass.run_command("g.remove", flags="f", type="rast", name= r_aspect_compass,
quiet = True)
grass.message( "Clean up done." )
grass.message( "----" )
Modified: grass-addons/grass7/raster/r.shaded.pca/r.shaded.pca.py
===================================================================
--- grass-addons/grass7/raster/r.shaded.pca/r.shaded.pca.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.shaded.pca/r.shaded.pca.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -5,7 +5,7 @@
# MODULE: r.shaded.pca
# AUTHOR(S): Vaclav Petras
# PURPOSE: Creates RGB composition from PCA of hill shades
-# COPYRIGHT: (C) 2013 by the GRASS Development Team
+# COPYRIGHT: (C) 2013-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
@@ -102,10 +102,10 @@
if REMOVE or MREMOVE:
core.info(_("Cleaning temporary maps..."))
for rast in REMOVE:
- grass.run_command('g.remove', rast=rast, quiet=True)
+ grass.run_command('g.remove', flags = 'f', type = 'rast', name = rast, quiet=True)
for pattern in MREMOVE:
- grass.run_command('g.mremove', rast='%s*' % pattern,
- flags='f', quiet=True)
+ grass.run_command('g.remove', flags = 'f', type = 'rast', pattern ='%s*' % pattern,
+ quiet=True)
def is_grass_7():
Modified: grass-addons/grass7/raster/r.shalstab/r.shalstab.py
===================================================================
--- grass-addons/grass7/raster/r.shalstab/r.shalstab.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.shalstab/r.shalstab.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -191,7 +191,7 @@
grass.run_command('g.rename', rast=("I_cri_average", susceptibility))
grass.run_command('g.rename', rast=("i_cri_mm", critic_rain))
# remove temporary map
- grass.run_command('g.remove', rast=("A",
+ grass.run_command('g.remove', flags='f', type='rast', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.skyview/r.skyview.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -8,7 +8,7 @@
#
# PURPOSE: Implementation of Sky-View Factor visualization technique
#
-# COPYRIGHT: (C) 2013 by the GRASS Development Team
+# COPYRIGHT: (C) 2013-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (version 2). Read the file COPYING that comes with GRASS
@@ -62,7 +62,7 @@
def cleanup():
if CLEANUP:
- gcore.run_command('g.mremove', rast=TMP_NAME + "*", flags='f')
+ gcore.run_command('g.remove', flags = 'f', type = 'rast', pattern =TMP_NAME + "*")
def main():
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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.to.vect.tiled/r.to.vect.tiled.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -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', vect = extname, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vect', name= extname, quiet = True)
if vtiles is None:
vtiles = outname
else:
vtiles = vtiles + ',' + outname
- grass.run_command('g.remove', vect = tilename, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vect', 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', vect = vtiles, quiet = True)
+ grass.run_command('g.remove', flags='f', type='vect', 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('v.clean', input = outpatch, output = output,
tool = 'break', flags = 'c')
- grass.run_command('g.remove', vect = outpatch)
+ grass.run_command('g.remove', flags='f', type='vect', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.valley.bottom/r.valley.bottom.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -99,7 +99,7 @@
grass.message( "..." )
- grass.run_command("g.remove", rast = r_slope_degree,
+ grass.run_command("g.remove", flags="f", type="rast", name= r_slope_degree,
quiet = True)
grass.message( "Step 1: Calculation of slope done." )
grass.message( "----" )
@@ -231,7 +231,7 @@
expr2 = "PCTL2 = (100.0 / 48.0) * (%s)" % " + ".join(terms2)
grass.mapcalc( expr2 )
- grass.run_command("g.remove", rast = "elevation_step1",
+ grass.run_command("g.remove", flags="f", type="rast", name= "elevation_step1",
quiet = True)
grass.message( "Step 2: Calculation of elevation percentile PCTL2 done" )
@@ -325,7 +325,7 @@
grass.message( "..." )
- grass.run_command('g.remove', rast = "DEM_smoothed_step3_slope_degree",
+ grass.run_command('g.remove', flags='f', type='rast', 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', rast = "DEM_smoothed_step4_slope_degree",
+ grass.run_command('g.remove', flags='f', type='rast', 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', rast = ["F1,F2,F3,F4"],
+ grass.run_command('g.remove', flags='f', type='rast', name= ["F1,F2,F3,F4"],
quiet = True)
- grass.run_command('g.remove', rast = ["CF2,CF3,CF4"],
+ grass.run_command('g.remove', flags='f', type='rast', name= ["CF2,CF3,CF4"],
quiet = True)
- grass.run_command('g.remove', rast = ["PCTL1,PCTL2,PCTL3,PCTL3_refined_base_resolution,PCTL4,PCTL4_refined_base_resolution"],
+ grass.run_command('g.remove', flags='f', type='rast', name= ["PCTL1,PCTL2,PCTL3,PCTL3_refined_base_resolution,PCTL4,PCTL4_refined_base_resolution"],
quiet = True)
- grass.run_command('g.remove', rast = ["PVF1,PVF2,PVF3,PVF4"],
+ grass.run_command('g.remove', flags='f', type='rast', name= ["PVF1,PVF2,PVF3,PVF4"],
quiet = True)
- grass.run_command('g.remove', rast = ["VF1,VF2,VF3,VF4"],
+ grass.run_command('g.remove', flags='f', type='rast', name= ["VF1,VF2,VF3,VF4"],
quiet = True)
- grass.run_command('g.remove', rast = ["W2,W3,W4"],
+ grass.run_command('g.remove', flags='f', type='rast', name= ["W2,W3,W4"],
quiet = True)
- grass.run_command('g.remove', rast = ["r_slope_step1,r_slope_step3,r_slope_step4,r_slope_step4_refined_base_resolution"],
+ 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"],
quiet = True)
- grass.run_command('g.remove', rast = ["DEM_smoothed_step3,DEM_smoothed_step3_coarsed,DEM_smoothed_step4,DEM_smoothed_step4_coarsed"],
+ grass.run_command('g.remove', flags='f', type='rast', 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/raster/r.vif/r.vif
===================================================================
--- grass-addons/grass7/raster/r.vif/r.vif 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/raster/r.vif/r.vif 2014-10-28 22:32:43 UTC (rev 62455)
@@ -11,7 +11,7 @@
# cells.
# Dependency: r.regression.multi
#
-# COPYRIGHT: (C) 2013 Paulo van Breugel
+# COPYRIGHT: (C) 2013-2014 Paulo van Breugel
# http://ecodiv.org
# http://pvanb.wordpress.com/
#
@@ -95,8 +95,8 @@
cleanup()
{
- g.mremove -f rast="rnicheOVERLAP$$_*" --quiet
- g.mremove -f rast="rnicheEQUIV$$_*" --quiet
+ g.remove -f type=rast pattern="rnicheOVERLAP$$_*" --quiet
+ g.remove -f type=rast pattern="rnicheEQUIV$$_*" --quiet
}
trap "cleanup" 2 3 15
@@ -187,13 +187,13 @@
done
if [ $remove_mask ]; then
- g.remove rast=MASK@${MAPSET},TMP_R_VIF_98765
+ g.remove -f type=rast name=MASK@${MAPSET},TMP_R_VIF_98765
unset remove_mask
fi
if [ $mask_exists ]; then
r.mask raster=mask_r_vif_backup
- g.remove rast=mask_r_vif_backup
+ g.remove -f type=rast name=mask_r_vif_backup
unset mask_exist
fi
Modified: grass-addons/grass7/vector/v.area.weigh/v.area.weigh.py
===================================================================
--- grass-addons/grass7/vector/v.area.weigh/v.area.weigh.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.area.weigh/v.area.weigh.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -42,11 +42,11 @@
def cleanup():
if rastertmp1:
- grass.run_command('g.remove', rast = rastertmp1, quiet = True)
+ grass.run_command('g.remove', flags='f', type='rast', name= rastertmp1, quiet = True)
if rastertmp2:
- grass.run_command('g.remove', rast = rastertmp2, quiet = True)
+ grass.run_command('g.remove', flags='f', type='rast', name= rastertmp2, quiet = True)
if rastertmp3:
- grass.run_command('g.remove', rast = rastertmp3, quiet = True)
+ grass.run_command('g.remove', flags='f', type='rast', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.centerline/v.centerline.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -63,15 +63,15 @@
def cleanup():
if grass.find_file(tmp_points_map, element='vector')['name']:
- grass.run_command('g.remove', vect=tmp_points_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', name=tmp_points_map, quiet=True)
if grass.find_file(tmp_line_map, element='vector')['name']:
- grass.run_command('g.remove', vect=tmp_line_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', name=tmp_line_map, quiet=True)
if grass.find_file(tmp_cleaned_map, element='vector')['name']:
- grass.run_command('g.remove', vect=tmp_cleaned_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', name=tmp_cleaned_map, quiet=True)
if grass.find_file(tmp_centerpoints_map, element='vector')['name']:
- grass.run_command('g.remove', vect=tmp_centerpoints_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', name=tmp_centerpoints_map, quiet=True)
if grass.find_file(tmp_map, element='vector')['name']:
- grass.run_command('g.remove', vect=tmp_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.civil/v.civil.road/v.civil.road.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -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', vect=NameMap+"_tmp2", quiet=True)
+ g.run_command('g.remove', flags='f', type='vect', 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', vect=NameMap+"_tmp3", quiet=True)
+ g.run_command('g.remove', flags='f', type='vect', 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', vect=NameMap+"_tmp3", quiet=True)
+ g.run_command('g.remove', flags='f', type='vect', 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', vect=NameMap+"_tmp1", quiet=True)
+ g.run_command('g.remove', flags='f', type='vect', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.civil/v.civil.topo/v.civil.topo.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -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', rast=OutName+"_TinDem_borrar")
+ grass.run_command('g.remove', flags='f', type='rast', 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', rast=OutName+"_NNbathyDem_borrar")
+ grass.run_command('g.remove', flags='f', type='rast', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.colors2/v.colors2.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -92,7 +92,7 @@
if tmp_vcol:
grass.try_remove(tmp_vcol)
if tmp_colr:
- grass.run_command('g.remove', rast = tmp_colr, quiet = True)
+ grass.run_command('g.remove', flags='f', type='rast', name= tmp_colr, quiet = True)
def main():
color = options['color']
Modified: grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py
===================================================================
--- grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -5,7 +5,7 @@
# MODULE: v.concave.hull
# AUTHOR(S): Markus Metz
# PURPOSE: Creates a concave hull around points
-# COPYRIGHT: (C) 2013 by the GRASS Development Team
+# COPYRIGHT: (C) 2013-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
@@ -42,7 +42,7 @@
def cleanup():
for ext in ['', '.sort']:
grass.try_remove(tmp + ext)
- grass.run_command('g.mremove', flags = 'f', vect = prefix + '_*', quiet = True)
+ grass.run_command('g.remove', flags = 'f', type = 'vect', pattern = prefix + '_*', quiet = True)
def sortfile(infile, outfile):
inf = file(infile, 'r')
Modified: grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py
===================================================================
--- grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.habitat.dem/v.habitat.dem.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -499,9 +499,9 @@
# clean up some temporay files and maps
grass.message( "Some clean up ..." )
- grass.run_command("g.remove", region = saved_region)
- grass.run_command("g.remove", rast = r_flow_accum)
- grass.run_command("g.remove", rast = r_habitat)
+ grass.run_command("g.remove", flags="f", type="region", name= saved_region)
+ grass.run_command("g.remove", flags="f", type="rast", name= r_flow_accum)
+ grass.run_command("g.remove", flags="f", type="rast", name= r_habitat)
grass.run_command("db.droptable", flags = 'f',
table = t_habitat_geomorphons)
grass.run_command("db.droptable", flags = 'f',
Modified: grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py
===================================================================
--- grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -250,7 +250,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', vect=catname, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.isochrones/v.isochrones.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -88,13 +88,13 @@
quiet=True)
if grass.find_file(tmp_cost_map, element='raster')['name']:
- grass.run_command('g.remove', rast=tmp_cost_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='rast', name=tmp_cost_map, quiet=True)
if grass.find_file(tmp_map, element='raster')['name']:
- grass.run_command('g.remove', rast=tmp_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='rast', name=tmp_map, quiet=True)
if grass.find_file(tmp_time_map, element='raster')['name']:
- grass.run_command('g.remove', rast=tmp_time_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='rast', name=tmp_time_map, quiet=True)
if grass.find_file(tmp_region_map, element='vector')['name']:
- grass.run_command('g.remove', vect=tmp_region_map, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', name=tmp_region_map, quiet=True)
def main():
Modified: grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py
===================================================================
--- grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.lidar.mcc/v.lidar.mcc.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -103,7 +103,7 @@
def cleanup():
nuldev = file(os.devnull, 'w')
- grass.run_command('g.remove', vect = '%s,%s,%s' % (temp_ng, temp_ncin, temp_ncout), quiet = True, stderr = nuldev)
+ grass.run_command('g.remove', flags='f', type='vect', name= '%s,%s,%s' % (temp_ng, temp_ncin, temp_ncout), quiet = True, stderr = nuldev)
def main():
global temp_ng, temp_ncin, temp_ncout
@@ -211,7 +211,7 @@
ng=grass.vector_info(temp_ng)['points']
nc = n_input - ng
n_input = nc
- grass.run_command('g.remove', vect = temp_ncin, quiet = True, stderr = nuldev)
+ 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 )
nc_points = temp_ncin
# Give information on process status
Modified: grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py
===================================================================
--- grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.neighborhoodmatrix/v.neighborhoodmatrix.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -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', vect=tempmapname, quiet=True)
+ grass.run_command('g.remove', flags='f', type='vect', 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-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.surf.icw/v.surf.icw.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -13,7 +13,7 @@
# PURPOSE: Like IDW interpolation, but distance is cost to get to any
# other site.
#
-# COPYRIGHT: (c) 2003-2011 Hamish Bowman
+# COPYRIGHT: (c) 2003-2014 Hamish Bowman
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
# for details.
@@ -129,7 +129,7 @@
def cleanup():
grass.verbose(_("Cleanup.."))
tmp_base = 'tmp_icw_' + str(os.getpid()) + '_'
- grass.run_command('g.mremove', flags = 'f', rast = tmp_base + '*',
+ grass.run_command('g.remove', flags = 'f', type = 'rast', pattern = tmp_base + '*',
quiet = True)
@@ -318,7 +318,7 @@
proc = {}
for i in range(n):
cost_site_name = tmp_base + 'cost_site.' + '%05d' % (i+1)
- grass.run_command('g.remove', rast = cost_site_name, quiet = True)
+ grass.run_command('g.remove', flags = 'f', rast = cost_site_name, quiet = True)
grass.run_command('g.rename', rast = cost_site_name + '.cleansed'
+ ',' + cost_site_name, quiet = True)
@@ -350,15 +350,15 @@
proc[i].wait()
# r.patch in=1by_cost_site_sqrd.${NUM},tmp_idw_cost_val_$$ out=1by_cost_site_sqrd.${NUM} --o
- # g.remove rast=cost_site.$NUM
+ # g.remove type=rast name=cost_site.$NUM -f
# make sure everyone is finished
for i in range(n):
if proc[i].wait() is not 0:
grass.fatal(_('Problem running %s') % 'r.mapcalc')
- grass.run_command('g.mremove', flags = 'f',
- rast = tmp_base + 'cost_site.*', quiet = True)
+ grass.run_command('g.remove', flags = 'f', type = 'rast',
+ pattern = tmp_base + 'cost_site.*', quiet = True)
#grass.run_command('g.list', type = 'rast', mapset = '.')
@@ -389,7 +389,7 @@
if post_mask:
grass.message(_("Removing post_mask <%s>"), post_mask)
- grass.run_command('g.remove', rast = 'MASK', quiet = True)
+ grass.run_command('g.remove', flags = 'f', name = 'MASK', quiet = True)
#######################################################
@@ -444,7 +444,7 @@
proc[num-1].wait()
# free up disk space ASAP
- #grass.run_command('g.remove', rast = one_by_cost_site_sq, quiet = True)
+ #grass.run_command('g.remove', flags = 'f', rast = one_by_cost_site_sq, quiet = True)
num += 1
if num > n:
@@ -455,7 +455,7 @@
proc[i].wait()
# free up disk space ASAP
- grass.run_command('g.mremove', flags = 'f',
+ grass.run_command('g.remove', flags = 'f',
rast = tmp_base + '1by_cost_site_sq.*', quiet = True)
#grass.run_command('g.list', type = 'rast', mapset = '.')
Modified: grass-addons/grass7/vector/v.to.lines/v.to.lines.py
===================================================================
--- grass-addons/grass7/vector/v.to.lines/v.to.lines.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.to.lines/v.to.lines.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -89,22 +89,22 @@
if 0 != grass.run_command('v.category', layer="2", type='boundary',
option='add', input=input, out=input_tmp,
quiet=quiet):
- grass.run_command('g.remove', vect=input_tmp, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=input_tmp, quiet=quiet)
grass.fatal(_("Error creating layer 2"))
if 0 != grass.run_command('v.db.addtable', map=input_tmp, layer="2",
columns="left integer,right integer",
quiet=quiet):
- grass.run_command('g.remove', vect=input_tmp, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=input_tmp, quiet=quiet)
grass.fatal(_("Error creating new table for layer 2"))
if 0 != grass.run_command('v.to.db', map=input_tmp, option="sides",
columns="left,right", layer="2", quiet=quiet):
- grass.run_command('g.remove', vect=input_tmp, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=input_tmp, quiet=quiet)
grass.fatal(_("Error populating new table for layer 2"))
if 0 != grass.run_command('v.type', input=input_tmp, output=out_type,
from_type='boundary', to_type='line',
quiet=quiet, layer="2"):
- grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=remove_names, quiet=quiet)
grass.fatal(_("Error converting polygon to line"))
report = grass.read_command('v.category', flags='g', input=out_type,
option='report', quiet=quiet).split('\n')
@@ -117,24 +117,24 @@
if 0 != grass.run_command('v.edit', map=out_type, tool='delete',
type='centroid', layer=2, quiet=quiet,
cats='{mi}-{ma}'.format(mi=min_cat, ma=max_cat)):
- grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=remove_names, quiet=quiet)
grass.fatal(_("Error removing centroids"))
try:
if 0 != grass.run_command('v.db.droptable', map=out_type, layer=1,
flags='f', quiet=True):
- grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=remove_names, quiet=quiet)
grass.fatal(_("Error removing table from layer 1"))
except:
grass.warning(_("No table for layer %d" % 1))
if 0 != grass.run_command('v.category', input=out_type, option='transfer',
output=output, layer="2,1", quiet=quiet,
overwrite=overwrite):
- grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=remove_names, quiet=quiet)
grass.fatal(_("Error adding categories"))
- grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=remove_names, quiet=quiet)
if point:
- grass.run_command('g.remove', vect=out_temp, quiet=quiet)
+ grass.run_command('g.remove', flags='f', type='vect', name=out_temp, quiet=quiet)
if __name__ == "__main__":
options, flags = grass.parser()
Modified: grass-addons/grass7/vector/v.transects/v.transects.py
===================================================================
--- grass-addons/grass7/vector/v.transects/v.transects.py 2014-10-28 22:29:22 UTC (rev 62454)
+++ grass-addons/grass7/vector/v.transects/v.transects.py 2014-10-28 22:32:43 UTC (rev 62455)
@@ -292,7 +292,7 @@
grass.run_command('v.category', input=temp_map, output=output,
option='add', type=shape)
- grass.run_command('g.remove', vect=temp_map)
+ grass.run_command('g.remove', flags='f', type='vect', name=temp_map)
if __name__ == "__main__":
options, flags = grass.parser()
More information about the grass-commit
mailing list