What’s wrong with this expression?
otbcli_BandMathX -il input.tif -out output.tif -exp '(im1<0) ? 0:im1'
I get:
Can’t evaluate function/operator “<”: Argument 1 of function/operator “” is of type ‘i’ whereas type ‘m’ was expected.
Actually, what I would like to do is the equivalent to this pseuocode:
if(ima>0 & ima <=1) ima
if (ima<0) 0
if(ima>1) 1
which I thought would be:
'(im1<0) ? 0:im1 ; (im1>1) ? 1:im1'
or
'(im1<0) ? 0:(im1>1) ? 1:im1'
But none are correct and the error messages are inextricable.
Is there a guide to BandMathX with examples of use?
The syntax is not trivial at all and what is offered in the Cookbook
is very insufficient. May be just a wiki page with examples
of successful expressions would be enough.
Agus