hi, the workaround is quite heavy but works most of the case : testing that you value are within a range:
it wold be something like (((im1b1>-9999)and(im1b1<9999)?im1b1:0) + (((im2b1>-9999)and(im2b1<9999))?im2b1) + .... if this does not work straight aways, try first with a gdalbuildvrt -vrtnodata None Le jeudi 31 janvier 2019 22:39:22 UTC+1, Álvaro Paredes a écrit : > > Hi everyone, > > I'm using otb BandMath to calculate some stats through several images, and > the problem that arises is that nodata values from the images are > interfering with results. > > Every image is a geotif of the same extent and resolution, but the > location of the NAs values are variable (due to clouds principally). If I > compute the sum or average of the images I end with and image full of NAs, > without any valid value (in all the images, there's at least one cell with > NAs). > > For example, I'm running: otbcli_BandMath -il im1.tif im2.tif > im3.tifim4.tif im5.tif im6.tif im7.tif im8.tif im9.tif im10.tif -out > test.tif -exp > "(im1b1+im2b1+im3b1+im4b1+im5b1+im6b1+im7b1+im8b1+im9b1+im10b1)" > > Is there any way to tell to the program to ignore nodata values or is > there a workaround to solve it? > > Regards, > -- This mailing will be abandoned soon in favor of a more friendly forum: https://forum.orfeo-toolbox.org Thanks to visit it for any question related to Orfeo Toolbox (OTB) usage, or to check the OTB FAQ: http://www.orfeo-toolbox.org/FAQ.html --- 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.
