def getConfiguration(self, **scalars):
red, ir = 1, 2
if scalars.has_key("red"): red = int(scalars["red"])
if scalars.has_key("ir"): ir = int(scalars["ir"])
return {
"extractBands": (red - 1, ir - 1), // extract only the two bands corresponding to user-specified red and infrared band indexes.
After Change
def getConfiguration(self, **scalars):
red = int(scalars.get("red", 1))
ir = int(scalars.get("ir", 2))
return {
"extractBands": (red - 1, ir - 1), // extract only the two bands corresponding to user-specified red and infrared band indexes.