Skip to content
Permalink
Browse files

remove repeated parameter

  • Loading branch information
Giovanni Manghi
Giovanni Manghi committed Oct 22, 2015
1 parent 83d99b1 commit ebd51b2c79ebd7d41056421e78031df25972dd98
@@ -66,10 +66,8 @@ def defineCharacteristics(self):
self.tr("Nodata value, leave blank to take the nodata value from input"),
''))
self.addParameter(ParameterExtent(self.PROJWIN, self.tr('Clipping extent')))
self.addParameter(ParameterString(self.EXTRA,
self.tr('Additional creation parameters'), '', optional=True))

params = []
params = []
params.append(ParameterSelection(self.RTYPE,
self.tr('Output raster type'), self.TYPE, 5))
params.append(ParameterSelection(self.COMPRESS,
@@ -95,7 +93,7 @@ def defineCharacteristics(self):
for param in params:
param.isAdvanced = True
self.addParameter(param)

self.addOutput(OutputRaster(self.OUTPUT, self.tr('Clipped (extent)')))

def getConsoleCommands(self):
@@ -110,7 +108,7 @@ def getConsoleCommands(self):
compress = self.COMPRESSTYPE[self.getParameterValue(self.COMPRESS)]
bigtiff = self.BIGTIFFTYPE[self.getParameterValue(self.BIGTIFF)]
tfw = unicode(self.getParameterValue(self.TFW))

arguments = []
arguments.append('-of')
arguments.append(GdalUtils.getFormatShortNameFromFilename(out))
@@ -76,8 +76,6 @@ def defineCharacteristics(self):
self.tr('Create and output alpha band'), False))
self.addParameter(ParameterBoolean(self.KEEP_RESOLUTION,
self.tr('Keep resolution of output raster'), False))
self.addParameter(ParameterString(self.EXTRA,
self.tr('Additional creation parameters'), '', optional=True))

params = []
params.append(ParameterSelection(self.RTYPE,
@@ -104,8 +102,8 @@ def defineCharacteristics(self):

for param in params:
param.isAdvanced = True
self.addParameter(param)
self.addParameter(param)

self.addOutput(OutputRaster(self.OUTPUT, self.tr('Clipped (mask)')))

def getConsoleCommands(self):
@@ -123,7 +121,7 @@ def getConsoleCommands(self):
compress = self.COMPRESSTYPE[self.getParameterValue(self.COMPRESS)]
bigtiff = self.BIGTIFFTYPE[self.getParameterValue(self.BIGTIFF)]
tfw = unicode(self.getParameterValue(self.TFW))

arguments = []
arguments.append('-ot')
arguments.append(self.TYPE[self.getParameterValue(self.RTYPE)])

0 comments on commit ebd51b2

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