mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04: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):
|
def initAlgorithm(self, config=None):
|
||||||
self.modes = ((self.tr('Use strict color matching'), '-exact_color_entry'),
|
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.addParameter(QgsProcessingParameterRasterLayer(self.INPUT,
|
||||||
self.tr('Input layer')))
|
self.tr('Input layer')))
|
||||||
@ -69,7 +70,7 @@ class ColorRelief(GdalAlgorithm):
|
|||||||
self.addParameter(QgsProcessingParameterEnum(self.MATCH_MODE,
|
self.addParameter(QgsProcessingParameterEnum(self.MATCH_MODE,
|
||||||
self.tr('Matching mode'),
|
self.tr('Matching mode'),
|
||||||
options=[i[0] for i in self.modes],
|
options=[i[0] for i in self.modes],
|
||||||
defaultValue=0))
|
defaultValue=2))
|
||||||
options_param = QgsProcessingParameterString(self.OPTIONS,
|
options_param = QgsProcessingParameterString(self.OPTIONS,
|
||||||
self.tr('Additional creation parameters'),
|
self.tr('Additional creation parameters'),
|
||||||
defaultValue='',
|
defaultValue='',
|
||||||
|
@ -68,6 +68,24 @@ tests:
|
|||||||
hash: 4f4720e4efe59a7f238f622659917bbeb5262369d15d5e2917dbcf8b
|
hash: 4f4720e4efe59a7f238f622659917bbeb5262369d15d5e2917dbcf8b
|
||||||
type: rasterhash
|
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
|
- algorithm: gdal:colorrelief
|
||||||
name: Color relief (gdaldem)
|
name: Color relief (gdaldem)
|
||||||
params:
|
params:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user