[GRASS-SVN] r63655 - in grass-addons/grass7: general/g.copyall raster/r.droka raster/r.fidimo raster/r.mcda.input raster/r.mcda.roughset raster/r.popgrowth vector/v.civil/v.civil.topo vector/v.isochrones
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 20 12:21:46 PST 2014
Author: neteler
Date: 2014-12-20 12:21:46 -0800 (Sat, 20 Dec 2014)
New Revision: 63655
Modified:
grass-addons/grass7/general/g.copyall/g.copyall.py
grass-addons/grass7/raster/r.droka/r.droka.py
grass-addons/grass7/raster/r.fidimo/r.fidimo.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/vector/v.civil/v.civil.topo/v.civil.topo.py
grass-addons/grass7/vector/v.isochrones/v.isochrones.py
Log:
update g.copy calls to use new element names (#2409)
Modified: grass-addons/grass7/general/g.copyall/g.copyall.py
===================================================================
--- grass-addons/grass7/general/g.copyall/g.copyall.py 2014-12-20 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/general/g.copyall/g.copyall.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -107,7 +107,7 @@
params = {datatype: '%s@%s,%s' % (input, mapset, output)}
grass.run_command('g.copy', overwrite=overwrite, **params)
- if datatype == 'vect' and flags['t']:
+ if datatype == 'vector' and flags['t']:
grass.run_command('v.build', map=output)
if __name__ == "__main__":
Modified: grass-addons/grass7/raster/r.droka/r.droka.py
===================================================================
--- grass-addons/grass7/raster/r.droka/r.droka.py 2014-12-20 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/raster/r.droka/r.droka.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -143,7 +143,7 @@
grass.message("Defining starting points...")
if int(num) == 1:
grass.run_command('g.copy' ,
- vect= start+',start_points_' ,
+ vector= start+',start_points_' ,
quiet = True )
else:
grass.run_command('v.buffer' ,
@@ -155,7 +155,7 @@
grass.run_command('v.random' ,
input = 'start_buffer_' ,
- n = num ,
+ npoints = num ,
output = 'start_random_' ,
flags = 'a' ,
quiet = True )
Modified: grass-addons/grass7/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2014-12-20 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -404,7 +404,7 @@
#Prepare Barriers/Snap barriers to river_vector
if options['barriers']:
grass.run_command("g.copy",
- vect = input_barriers + "," + "barriers_tmp_%d" % os.getpid())
+ vector = input_barriers + "," + "barriers_tmp_%d" % os.getpid())
grass.run_command("v.db.addcolumn",
map ="barriers_tmp_%d" % os.getpid(),
@@ -427,7 +427,7 @@
columns="dist DOUBLE")
# Making barriers permanent
grass.run_command("g.copy",
- vect = "barriers_%d" % os.getpid() + "," + output_fidimo + "_barriers")
+ vector = "barriers_%d" % os.getpid() + "," + output_fidimo + "_barriers")
#Breaking river_vector at position of barriers to get segments
for adj_X,adj_Y in db.execute('SELECT adj_X, adj_Y FROM barriers_%d'% os.getpid()):
@@ -529,7 +529,7 @@
res = res)
grass.run_command("g.copy",
overwrite=True,
- rast = "river_raster_combine_tmp_%d" % os.getpid() + "," "river_raster_tmp_%d" % os.getpid())
+ raster = "river_raster_combine_tmp_%d" % os.getpid() + "," "river_raster_tmp_%d" % os.getpid())
@@ -644,7 +644,7 @@
# Make source points permanent
grass.run_command("g.copy",
- vect = "source_points_%d" % os.getpid() + "," + output_fidimo + "_source_points")
+ vector = "source_points_%d" % os.getpid() + "," + output_fidimo + "_source_points")
########### Looping over nrun, over segements, over source points ##########
@@ -1038,7 +1038,7 @@
mapcalc_string_Bb_aggregate = mapcalc_string_Bb_aggregate,
overwrite = True)
grass.run_command("g.copy",
- rast = "realised_density_final_%d" % os.getpid() + ",realised_" + output_fidimo+"_"+i)
+ raster = "realised_density_final_%d" % os.getpid() + ",realised_" + output_fidimo+"_"+i)
# Set all 0-values to NULL, Backgroundvalues
grass.run_command("r.null", map="realised_"+output_fidimo+"_"+i, setnull="0")
@@ -1052,7 +1052,7 @@
scalar = scalar)
grass.run_command("g.copy",
- rast = "density_final_corrected_%d" % os.getpid() + "," + output_fidimo+"_"+i)
+ raster = "density_final_corrected_%d" % os.getpid() + "," + output_fidimo+"_"+i)
# Set all 0-values to NULL, Backgroundvalues
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 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/raster/r.mcda.input/r.mcda.input.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -121,7 +121,7 @@
if len(map_synth)>1:
grass.run_command("r.patch", overwrite='True', input=(",".join(map_synth)), output=l )
else:
- grass.run_command("g.copy",rast=(str(map_synth),l))
+ grass.run_command("g.copy", raster=(str(map_synth),l))
grass.run_command("r.to.vect", overwrite='True', flags='s', input=l, output=l, feature='area')
grass.run_command("v.db.addcol", map=l, columns='rule varchar(25)')
@@ -132,7 +132,7 @@
if len(maps)>1:
grass.run_command("v.patch", overwrite='True', flags='e', input=mapstring, output=outputMap)
else:
- grass.run_command("g.copy",vect=(mapstring,outputMap))
+ grass.run_command("g.copy", vector=(mapstring,outputMap))
def main():
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 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/raster/r.mcda.roughset/r.mcda.roughset.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -543,7 +543,7 @@
if len(map_synth)>1:
grass.run_command("r.patch", overwrite='True', input=(",".join(map_synth)), output=l )
else:
- grass.run_command("g.copy",rast=(str(map_synth),l))
+ grass.run_command("g.copy", raster=(str(map_synth),l))
print "__",str(map_synth),l
grass.run_command("r.to.vect", overwrite='True', flags='s', input=l, output=l, feature='area')
grass.run_command("v.db.addcol", map=l, columns='rule varchar(25)')
@@ -554,7 +554,7 @@
if len(maps)>1:
grass.run_command("v.patch", overwrite='True', flags='e', input=mapslabels, output=outputMap)
else:
- grass.run_command("g.copy",vect=(mapslabels,outputMap))
+ grass.run_command("g.copy", vector=(mapslabels,outputMap))
if not flags['l']:
grass.run_command("g.remove", flags='f', type='raster', name=mapstring)
Modified: grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py
===================================================================
--- grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py 2014-12-20 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/raster/r.popgrowth/r.popgrowth.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -181,7 +181,7 @@
output="n0_tmp_%d" % os.getpid())
else:
grass.run_command("g.copy",
- rast=options['n_initial']+","+"n0_tmp_%d" % os.getpid())
+ raster=options['n_initial']+","+"n0_tmp_%d" % os.getpid())
tmp_map_rast.append("n0_tmp_")
@@ -240,7 +240,7 @@
output="r_exp_tmp_%d" % os.getpid())
else:
grass.run_command("g.copy",
- rast=options['r_exp_map']+","+"r_exp_tmp_%d" % os.getpid())
+ raster=options['r_exp_map']+","+"r_exp_tmp_%d" % os.getpid())
tmp_map_rast.append("r_exp_tmp_")
@@ -271,7 +271,7 @@
else:
grass.run_command("g.copy",
- rast="exponential_output_tmp_%d" % os.getpid() + ","+options['exponential_output'])
+ raster="exponential_output_tmp_%d" % os.getpid() + ","+options['exponential_output'])
################# Ricker Model #################
if options['ricker_output']:
@@ -292,7 +292,7 @@
output="r_rick_tmp_%d" % os.getpid())
else:
grass.run_command("g.copy",
- rast=options['r_rick_map']+","+"r_rick_tmp_%d" % os.getpid())
+ raster=options['r_rick_map']+","+"r_rick_tmp_%d" % os.getpid())
tmp_map_rast.append("r_rick_tmp_")
@@ -314,7 +314,7 @@
output="k_tmp_%d" % os.getpid())
else:
grass.run_command("g.copy",
- rast=options['k_map']+","+"k_tmp_%d" % os.getpid())
+ raster=options['k_map']+","+"k_tmp_%d" % os.getpid())
tmp_map_rast.append("k_tmp_")
@@ -345,7 +345,7 @@
else:
grass.run_command("g.copy",
- rast="ricker_output_tmp_%d" % os.getpid() +","+options['ricker_output'])
+ raster="ricker_output_tmp_%d" % os.getpid() +","+options['ricker_output'])
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 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/vector/v.civil/v.civil.topo/v.civil.topo.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -391,7 +391,7 @@
def patch_maps(pointsMap,linesMap,tmpMap):
- grass.run_command('g.copy', vect=pointsMap+','+tmpMap)
+ grass.run_command('g.copy', vector=pointsMap+','+tmpMap)
# lee las columnas de mapa de puntos y inserta las columnas si no existen
columsPts=grass.read_command('db.columns', table=tmpMap)
Modified: grass-addons/grass7/vector/v.isochrones/v.isochrones.py
===================================================================
--- grass-addons/grass7/vector/v.isochrones/v.isochrones.py 2014-12-20 20:07:43 UTC (rev 63654)
+++ grass-addons/grass7/vector/v.isochrones/v.isochrones.py 2014-12-20 20:21:46 UTC (rev 63655)
@@ -175,7 +175,7 @@
grass.run_command('g.rename', raster = (tmp_map, tmp_time_map))
if timemap:
- grass.run_command('g.copy', rast=(tmp_time_map, timemap))
+ grass.run_command('g.copy', raster=(tmp_time_map, timemap))
grass.run_command('r.colors', map=timemap, color='grey', flags='ne')
# recode time distance to time steps
More information about the grass-commit
mailing list