mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing][gdal] color relief alg: add the default color option, i.e., no switches
This commit is contained in:
parent
8df954d6b8
commit
08332e73a2
@ -54,7 +54,8 @@ class ColorRelief(GdalAlgorithm):
|
||||
|
||||
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 @@ class ColorRelief(GdalAlgorithm):
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user