[GRASS-user] bitpattern analysis

Laura Poggio laura.poggio at gmail.com
Mon Jun 15 06:06:15 EDT 2009


Dear all,
I am trying to use the QA information of MODIS products. I found that this
analysis can be done in GRASS with r.bitpattern (from Neteler, 2005 with
some examples<http://wald.intevation.org/tracker/index.php?func=detail&aid=576&group_id=21&atid=207>)
or with r.mapcalc .

>From what I understood, the use of r.mapcal seems to be more flexible. I am
just wondering if there are some code examples using the bitwise operators
of mapcalc. I found<http://www.mail-archive.com/grassuser@grass.itc.it/msg00127.html>the
following code:

"lst_filt = (lstmap ~ [XX XX XX 00]) || (lstmap ~ [XX XX 0X 01])"

but to me it is not really clear how this works, especially compared to the
code <http://www.mail-archive.com/grassuser@grass.itc.it/msg00004.html>provided
(and explained) by Glynn Clements:

r.mapcalc MASK="if((sur_refl_qc_250 / 16) % 16 == 11 , 1, null())"

Thank you very much for any help.

Laura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20090615/bfa72492/attachment.html


More information about the grass-user mailing list