Skip to content
Permalink
Browse files

[processing][gdal] color relief alg: add the default color option, i.…

…e., no switches
  • Loading branch information
ajolma authored and nyalldawson committed Mar 11, 2018
1 parent 8df954d commit 08332e73a2dfd166e3a7fe8ac19abbd83be9c5aa
@@ -54,7 +54,8 @@ def __init__(self):

def initAlgorithm(self, config=None):
self.modes = ((self.tr('Use strict color matching'), '-exact_color_entry'),
(self.tr('Use closest RGBA quadruplet'), '-nearest_color_entry'))
(self.tr('Use closest RGBA quadruplet'), '-nearest_color_entry'),
(self.tr('Use smoothly blended colors'), ''))

self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT,
self.tr('Input layer')))
@@ -69,7 +70,7 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterEnum(self.MATCH_MODE,
self.tr('Matching mode'),
options=[i[0] for i in self.modes],
defaultValue=0))
defaultValue=2))
options_param = QgsProcessingParameterString(self.OPTIONS,
self.tr('Additional creation parameters'),
defaultValue='',
@@ -68,6 +68,24 @@ tests:
hash: 4f4720e4efe59a7f238f622659917bbeb5262369d15d5e2917dbcf8b
type: rasterhash

- algorithm: gdal:colorrelief
name: Color relief (gdaldem)
params:
BAND: 1
COLOR_TABLE:
name: custom/color_relief.txt
type: file
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
MATCH_MODE: 2
OPTIONS: ''
results:
OUTPUT:
hash: f714597fadc9cfc3f5263dc0e35f7c6ba285de238dce439e4988faac
type: rasterhash

- algorithm: gdal:colorrelief
name: Color relief (gdaldem)
params:

0 comments on commit 08332e7

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