Skip to content

Commit

Permalink
[processing][grass] Correctly return the actual generated filename
Browse files Browse the repository at this point in the history
locations as the algorithm results, don't just echo back the parameter
value

Otherwise we don't return the correct value for temporary file locations
or for file paths during model execution

Fixes #36379
  • Loading branch information
nyalldawson committed Jun 11, 2020
1 parent af2e50c commit ef19911
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,8 @@ def exportRasterLayerFromParameter(self, name, parameters, context, colorTable=T
metaOpt = self.parameterAsString(parameters, self.GRASS_RASTER_FORMAT_META, context)
self.exportRasterLayer(grassName, fileName, colorTable, outFormat, createOpt, metaOpt)

self.fileOutputs[name] = fileName

def exportRasterLayer(self, grassName, fileName,
colorTable=True, outFormat='GTiff',
createOpt=None,
Expand Down Expand Up @@ -947,6 +949,8 @@ def exportVectorLayerFromParameter(self, name, parameters, context, layer=None,
exportnocat = self.parameterAsBoolean(parameters, self.GRASS_VECTOR_EXPORT_NOCAT, context)
self.exportVectorLayer(grassName, fileName, layer, nocats, dataType, outFormat, dsco, lco, exportnocat)

self.fileOutputs[name] = fileName

def exportVectorLayer(self, grassName, fileName, layer=None, nocats=False, dataType='auto',
outFormat=None, dsco=None, lco=None, exportnocat=False):
"""
Expand Down

0 comments on commit ef19911

Please sign in to comment.