Skip to content
Permalink
Browse files

fix output command for some GRASS7 tool

  • Loading branch information
gioman committed Oct 6, 2017
1 parent 6ed0d27 commit 6b7cc068b1f284ec060cc40cc433f12d857d12f4
@@ -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]
@@ -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]
@@ -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]
)
@@ -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]
@@ -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]
)
@@ -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]
@@ -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]
)

0 comments on commit 6b7cc06

Please sign in to comment.
You can’t perform that action at this time.