If, as Victor indicates, BandMathX is not taking no-data values into
account, this has to be considered an error, thus my request is
not a desirable feature but an error report.
Doing 45.5/no-data = 3.4028234663852886e+38 is an error!
By now I'm using gdal_edit.py to set 3.4028234663852886e+38 as no-data
value after using BandMathX, but this is very inelegant and not really
that helpful
as OTB applications (such as DimensionalityReduction) do not recognize
the no-data (NA) values as such either...

I read the doc on ManageNoData but found 2 problems:
1. As far as I understand, ManageNoData creates only 1 layer (am I
wrong?), which implies that the presence of 1 no-data value in 1
single band would mask out the entire pixel. This can make sense in
some cases, but certainly not in many others. Consider the case of a
time series of NDVI "images": you normally do not want to drop the
entire time series just by 1 missing observation represented as NA.
In the case of R, the user can set, for a giving operation, na.rm=TRUE
or FALSE. i.e., mean(1,2,3,NA, na.rm=TRUE) = mean(1,2,3), while
mean(1,2,3,NA, na.rm=FALSE)=NA
I think OTB should incorporate this type of no-data management, as
there are always no-data values in mages.
2. I do not see how other OTB applications can take the mask generated
by ManageNoData, in particular BandMathX itsel or
DimensionalityReduction.

Agus

On Mon, Jan 7, 2019 at 10:15 AM Poughon Victor <[email protected]> wrote:
>
> Hi Agustin,
>
> BandMathX does not read no-data metadata and handles no-data value just like 
> regular values. It would be a nice feature to add to the application.
>
> In the meantime, you can modify your expression to conditionally ignore those 
> value but it might be a bit tricky since your nodata value is FLOAT_MAX. Have 
> a look at the ManageNoData application or even gdal_translate which can help 
> you with that.
>
> Best,
>
> Victor Poughon
>
> ________________________________________
> De : [email protected] [[email protected]] de la part de 
> Agustin Lobo [[email protected]]
> Envoyé : vendredi 4 janvier 2019 14:48
> À : [email protected]
> Objet : [otb-users] No data handling in BandMathX
>
> Hi!
> Having an operation such as im1/im2
> where both im1 and im2 are tif multi-spectral images with 0 set as
> no-data value, otbcli_BandMathX complains about
> "Generated 0 Underflow(s) And 836 Overflow(s)"
> and the resulting tif image does not have the 3.4028234663852886e+38
> value set as no-data (actually, does not have any value set as
> no-data...).
> Why?
> This is inconvenient, is there any way to specify BandMathX to take the
> no-data values into account so that any operation with a no-data value
> becomes no-data for a given pixel in a given band?
>
> Agus
>
> --
> --
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to