1

I want to run this expression; Note that it should be raised to power1/3. '[Band5*(256-Band4)*(Band5-Band4)+1]"^"(1/3)', {

And I'm getting this error; Image.parse Expression: Expression parse error at character 0: '[Band5*(256-Band4)*(Band5-Band4)+1]"^"(1/3)' ^. Is my expression correct?

1 Answer 1

6

In the expression language of Image.expression, exponentiation is **, not ^, and you cannot use square brackets for grouping, only parentheses. So, your expression would be written as

image.expression('(Band5 * (256-Band4) * (Band5-Band4) + 1) ** (1/3)', {
  'Band5': ...,
  'Band4': ...
})
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.