Skip to content

Commit

Permalink
Merge pull request #5313 from NaturalGIS/grass7_more_output_fixes
Browse files Browse the repository at this point in the history
[processing] fix output command for some GRASS 7 tools
  • Loading branch information
alexbruy authored Oct 6, 2017
2 parents e8628fb + 6b7cc06 commit 7935c41
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

def processOutputs(alg):
out = alg.getOutputValue('output')
command = u"v.out.ogr -c -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
command = u"v.out.ogr --overwrite -c -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
alg.exportedLayers[out],
os.path.dirname(out),
os.path.splitext(os.path.basename(out))[0]
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/v_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def processOutputs(alg):
# Output results ('from' table and output table)
for output in [u'from_output', u'output']:
out = alg.getOutputValue(output)
command = u"v.out.ogr -c type=auto -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
command = u"v.out.ogr --overwrite -c type=auto -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
alg.exportedLayers[out],
os.path.dirname(out),
os.path.basename(out)[:-4]
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/v_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def processOutputs(alg):
# We need to add the from layer to outputs:
out = alg.exportedLayers[alg.getParameterValue('map')]
from_out = alg.getOutputValue('output')
command = u"v.out.ogr -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
command = u"v.out.ogr --overwrite -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
out, os.path.dirname(from_out),
os.path.splitext(os.path.basename(from_out))[0]
)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/v_net_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

def processOutputs(alg):
out = alg.getOutputValue(u"output")
command = u"v.out.ogr -c type=line layer=1 -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
command = u"v.out.ogr --overwrite -c type=line layer=1 -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
alg.exportedLayers[out],
os.path.dirname(out),
os.path.basename(out)[:-4]
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/v_vect_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def processOutputs(alg):
# We need to add the vector layer to outputs:
out = alg.exportedLayers[alg.getParameterValue('areas')]
from_out = alg.getOutputValue('output')
command = u"v.out.ogr -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
command = u"v.out.ogr --overwrite -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
out, os.path.dirname(from_out),
os.path.splitext(os.path.basename(from_out))[0]
)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/v_what_rast.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def removeOutput(alg):
def outputInput(alg):
"""Make output the initial point/polygon layer"""
output = alg.getOutputValue(u'output')
command = u"v.out.ogr -c type=auto -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
command = u"v.out.ogr --overwrite -c type=auto -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
alg.exportedLayers[alg.getParameterValue(u'map')],
os.path.dirname(output),
os.path.basename(output)[:-4]
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/v_what_vect.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def processOutputs(alg):
# We need to add the vector layer to outputs:
out = alg.exportedLayers[alg.getParameterValue('map')]
from_out = alg.getOutputValue('output')
command = u"v.out.ogr -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
command = u"v.out.ogr --overwrite -s -e input={} output=\"{}\" format=ESRI_Shapefile output_layer={}".format(
out, os.path.dirname(from_out),
os.path.splitext(os.path.basename(from_out))[0]
)
Expand Down

0 comments on commit 7935c41

Please sign in to comment.