[GRASS-user] Question about isnull() in map algebra

Margherita Di Leo diregola at gmail.com
Thu Jun 6 07:13:25 PDT 2019


Hi,

reading the training material here:
http://training.gismentors.eu/grass-gis-irsae-winter-course-2018/units/23.html
I have a doubt. When cloud mask is applied to calculate NDVI

t.rast.mapcalc input=b4,b8,cloud output=ndvi_cloud
\expression="if(isnull(cloud), null(), float(b8 - b4) / ( b8 + b4 ))"
\basename=ndvi_cloud nproc=3

what happens if there is no cloud mask at all for a certain map? In this
case NDVI should be taken as is. Instead, to my understanding, what
happens:

if(isnull(cloud), null()

If cloud map is not found (meaning there is no cloud detected),
isnull(cloud)=True, so the NDVI resulting map is null too. Please correct
me if I'm wrong.

Thanks

-- 
Margherita Di Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190606/9db18813/attachment.html>


More information about the grass-user mailing list