Skip to content
Permalink
Browse files

[processing] set default value for band parameters in GDAL algs (fix #…

…20610)

(cherry picked from commit 1e1ed79)
  • Loading branch information
alexbruy committed Dec 30, 2018
1 parent 7db8910 commit 4ff4b6fafbf2ee1af72f2331b21c4b5d9c521a09
@@ -62,6 +62,7 @@ def initAlgorithm(self, config=None):
self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterBoolean(self.COMPUTE_EDGES,
self.tr('Compute edges'),
@@ -59,6 +59,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterBoolean(self.TRIG_ANGLE,
self.tr('Return trigonometric angle instead of azimuth'),
@@ -66,6 +66,7 @@ def initAlgorithm(self, config=None):
self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterNumber(self.INTERVAL,
self.tr('Interval between contour lines'),
@@ -59,6 +59,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterNumber(self.DISTANCE,
self.tr('Maximum distance (in pixels) to search out for values to interpolate'),
@@ -53,6 +53,7 @@ def initAlgorithm(self, config=None):
self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterBoolean(self.CSV,
self.tr('Output comma-separated values'),
@@ -65,6 +65,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterNumber(self.Z_FACTOR,
self.tr('Z factor (vertical exaggeration)'),
@@ -57,6 +57,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterBoolean(self.RGBA,
self.tr('Generate a RGBA file'),
@@ -59,6 +59,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterString(self.FIELD,
self.tr('Name of the field to create'),
@@ -75,6 +75,7 @@ def initAlgorithm(self, config=None):
self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterString(self.VALUES,
self.tr('A list of pixel values in the source image to be considered target pixels'),
@@ -57,6 +57,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterBoolean(self.COMPUTE_EDGES,
self.tr('Compute edges'),
@@ -61,6 +61,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterNumber(self.SCALE,
self.tr('Ratio of vertical units to horizontal'),
@@ -56,6 +56,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterBoolean(self.COMPUTE_EDGES,
self.tr('Compute edges'),
@@ -55,6 +55,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BAND,
self.tr('Band number'),
1,
parentLayerParameterName=self.INPUT))
self.addParameter(QgsProcessingParameterBoolean(self.COMPUTE_EDGES,
self.tr('Compute edges'),

0 comments on commit 4ff4b6f

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