Dear all,<br>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 <a href="http://wald.intevation.org/tracker/index.php?func=detail&amp;aid=576&amp;group_id=21&amp;atid=207" target="_blank">examples</a>) or with r.mapcalc . <br>


<br>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 <a href="http://www.mail-archive.com/grassuser@grass.itc.it/msg00127.html" target="_blank">found</a> the following code:<br>

<pre>&quot;lst_filt = (lstmap ~ [XX XX XX 00]) || (lstmap ~ [XX XX 0X 01])&quot;<br></pre>but to me it is not really clear how this works, especially compared to the <a href="http://www.mail-archive.com/grassuser@grass.itc.it/msg00004.html" target="_blank">code</a> provided (and explained) by Glynn Clements:<br>

<pre>r.mapcalc MASK=&quot;if((sur_refl_qc_250 / 16) % 16 == 11 , 1, null())&quot;<br><br></pre>Thank you very much for any help.<br><br>Laura<br><br><br><br>
 <br>