From d3cea33358f60c1ed6ec0699723ae2068536d0a0 Mon Sep 17 00:00:00 2001 From: Geoff Kimbell Date: Fri, 7 Sep 2018 17:28:18 +0100 Subject: [PATCH] Update contour.py --- python/plugins/processing/algs/gdal/contour.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/plugins/processing/algs/gdal/contour.py b/python/plugins/processing/algs/gdal/contour.py index f4caeb0118..073d888559 100644 --- a/python/plugins/processing/algs/gdal/contour.py +++ b/python/plugins/processing/algs/gdal/contour.py @@ -55,6 +55,7 @@ class contour(GdalAlgorithm): IGNORE_NODATA = 'IGNORE_NODATA' NODATA = 'NODATA' OFFSET = 'OFFSET' + OPTIONS = 'OPTIONS' OUTPUT = 'OUTPUT' def __init__(self): @@ -74,6 +75,10 @@ class contour(GdalAlgorithm): self.addParameter(QgsProcessingParameterString(self.FIELD_NAME, self.tr('Attribute name (if not set, no elevation attribute is attached)'), defaultValue='ELEV', + optional=True)) + self.addParameter(QgsProcessingParameterString(self.OPTIONS, + self.tr('Additional creation options'), + defaultValue='', optional=True)) create_3d_param = QgsProcessingParameterBoolean(self.CREATE_3D, @@ -162,6 +167,9 @@ class contour(GdalAlgorithm): if offset: arguments.append('-off {}'.format(offset)) + + if options: + arguments.append(options) if outFormat: arguments.append('-f {}'.format(outFormat)) -- 2.18.0.windows.1