Skip to content
Permalink
Browse files

Merge pull request #3030 from NaturalGIS/processing_fix_raster_clip_n…

…odata

[processing] set nodata parameter as optional in GDAL algs
  • Loading branch information
alexbruy committed Apr 26, 2016
2 parents 8a9cb05 + a4b2cde commit 050226532027d962126fe944b62ffef93b50f231
@@ -73,7 +73,7 @@ def defineCharacteristics(self):
self.INPUT, self.tr('Input layer'), False))
self.addParameter(ParameterString(self.NO_DATA,
self.tr("Nodata value, leave blank to take the nodata value from input"),
''))
'', optional=True))
self.addParameter(ParameterExtent(self.PROJWIN, self.tr('Clipping extent')))

params = []
@@ -82,7 +82,7 @@ def defineCharacteristics(self):
[ParameterVector.VECTOR_TYPE_POLYGON]))
self.addParameter(ParameterString(self.NO_DATA,
self.tr("Nodata value, leave blank to take the nodata value from input"),
'-9999'))
'', optional=True))
self.addParameter(ParameterBoolean(self.ALPHA_BAND,
self.tr('Create and output alpha band'), False))
self.addParameter(ParameterBoolean(self.CROP_TO_CUTLINE,
@@ -88,7 +88,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterString(self.FORMULA,
self.tr('Calculation in gdalnumeric syntax using +-/* or any numpy array functions (i.e. logical_and())'), 'A*2', optional=False))
self.addParameter(ParameterString(self.NO_DATA,
self.tr('Set output nodata value'), '-9999'))
self.tr('Set output nodata value'), '', optional=True))
self.addParameter(ParameterSelection(self.RTYPE,
self.tr('Output raster type'), self.TYPE, 5))
#self.addParameter(ParameterBoolean(
@@ -95,7 +95,7 @@ def defineCharacteristics(self):
self.TYPE, 5))
params.append(ParameterString(self.NO_DATA,
self.tr("Nodata value"),
'-9999'))
'', optional=True))
params.append(ParameterSelection(self.COMPRESS,
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
params.append(ParameterNumber(self.JPEGCOMPRESSION,
@@ -85,7 +85,7 @@ def defineCharacteristics(self):
self.tr('Output size is a percentage of input size'), True))
self.addParameter(ParameterString(self.NO_DATA,
self.tr("Nodata value, leave blank to take the nodata value from input"),
''))
'', optional=True))
self.addParameter(ParameterSelection(self.EXPAND,
self.tr('Expand'), ['none', 'gray', 'rgb', 'rgba']))
self.addParameter(ParameterCrs(self.SRS,
@@ -80,7 +80,7 @@ def defineCharacteristics(self):
self.tr('Destination SRS'), ''))
self.addParameter(ParameterString(self.NO_DATA,
self.tr("Nodata value, leave blank to take the nodata value from input"),
'-9999'))
'', optional=True))
self.addParameter(ParameterNumber(self.TR,
self.tr('Output file resolution in target georeferenced units (leave 0 for no change)'),
0.0, None, 0.0))

0 comments on commit 0502265

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