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?

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': ...
})
1
  • Thanks for the response. It was very helpful. – Merceline Apr 20 '20 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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