[GRASS-user] error in i.sentinel.mask: nan values in xml file
Veronica Andreo
veroandreo at gmail.com
Tue Jan 28 10:57:51 PST 2020
Hello
I try to use i.sentinel.mask but I get the following error:
i.sentinel.mask blue=$blue green=$green red=$red swir11=$swir11 nir=$nir
swir12=$swir12 nir8a=$nir8a cloud_mask=cloud shadow_mask=shadow
mtd_file=`find $out_dir -name 'MTD_TL.xml'`
ADVERTENCIA: All subsequent operations will be limited to the current
computational region
ADVERTENCIA: Any rescale factor has been applied
--- Start computing maximum values of bands ---
T21JYM_20200126T134201_B02_10m
T21JYM_20200126T134201_B03_10m
T21JYM_20200126T134201_B04_10m
T21JYM_20200126T134201_B08_10m
T21JYM_20200126T134201_B8A_20m
T21JYM_20200126T134201_B11_20m
T21JYM_20200126T134201_B12_20m
--- Computed maximum value: dict_values([nan, nan, nan, nan, nan, nan,
nan]) ---
--- Statistics have been computed! ---
--- Start clouds detection procedure ---
--- Computing cloud mask... ---
Mapa no vĂ¡lido <nan>
Parse error
ERROR: error al parsear
ERROR: An error occurred while running r.mapcalc with expression:
cloud_def82115 = if((((T21JYM_20200126T134201_B02_10m > (0.08*nan))
&& (T21JYM_20200126T134201_B03_10m > (0.08*nan)) &&
(T21JYM_20200126T134201_B04_10m > (0.08*nan))) == 1) &&
(((T21JYM_20200126T134201_B04_10m < ((0.08*nan)*1.5)) &&
(T21JYM_20200126T134201_B04_10m >
T21JYM_20200126T134201_B12_20m*1.3)) == 0) &&
(((T21JYM_20200126T134201_B11_20m < (0.1*nan)) &&
(T21JYM_20200126T134201_B12_20m < (0.1*nan))) == 0) &&
((if(T21JYM_20200126T134201_B8A_20m ==
max(T21JYM_20200126T134201_B8A_20m, 2 *
T21JYM_20200126T134201_B02_10m, 2 * T21JYM_20200126T134201_B03_10m,
2 * T21JYM_20200126T134201_B04_10m))) == 0) &&
((T21JYM_20200126T134201_B02_10m > 0.2) == 1), 0, null())
I checked the xml file and there are a lot of nan's yes, but there are also
real values. Why doesn't the max function in this part:
https://github.com/OSGeo/grass-addons/blob/master/grass7/imagery/i.sentinel/i.sentinel.mask/i.sentinel.mask.py#L321
recognize them? Isn't there a way to avoid nan while computing max?
Thanks much in advance
Vero
ps: I can provide the xml if needed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20200128/8ce8fe28/attachment.html>
More information about the grass-user
mailing list