[GRASS-user] GRASS7 r.mapcalc not working

Markus Neteler neteler at osgeo.org
Thu Mar 13 09:35:33 PDT 2014


On Thu, Mar 13, 2014 at 5:28 PM, César Augusto Ramírez Franco
<caesarivs at gmail.com> wrote:
> Hello Markus, I'm using the terminal on Debian Testing/SID
>
> I'm trying to make a mask for the pixels of a landsat 8 image inside a basin
>
> mask1 is my basin, and mask2 is the cloudmask of the landsat image
>
> I calculated the cloudmask with
>
> r.mapcalc "cloudmask = if( (BQA ==1 || BQA >= 49152), null(), 1)"
>
> Maybe I'm using the wrong logic inside the if statement? How do I get
> r.mapcalc to make an intersection of the two masks other than summing them?

I would use the bitpatterns of the QA file. Some example you can find here:

http://courses.neteler.org/processing-landsat8-data-in-grass-gis-7/
--> 8. Applying the Landsat 8 Quality Assessment (QA) Band

Best
Markus


More information about the grass-user mailing list