Thank you for the links that helped to understand more how the things are working within GRASS. <br><br>For the moment I decided to use <br>r.mapcalc QA_field1="(QA>>bit_position_field1)% bit_length_field1"<br>
for the different fields and then combining the files obtained into a mask.<br><br>Thanks<br><br>Laura<br><br><div class="gmail_quote">2009/6/15 Hamish <span dir="ltr"><<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
Laura Poggio wrote:<br>
> I am trying to use the QA information of MODIS products. I<br>
> found that this analysis can be done in GRASS with<br>
> r.bitpattern (from Neteler, 2005 with some examples)<br>
> or with r.mapcalc .<br>
><br>
> From what I understood, the use of r.mapcal seems to be<br>
> more flexible. I am just wondering if there are some code<br>
> examples using the bitwise operators of mapcalc.<br>
<br>
</div>this doesn't answer your question directly, but maybe it is of<br>
interest:<br>
<a href="http://grass.osgeo.org/wiki/MODIS" target="_blank">http://grass.osgeo.org/wiki/MODIS</a><br>
<br>
and quality layer application method here<br>
<a href="http://grass.osgeo.org/wiki/AVHRR" target="_blank">http://grass.osgeo.org/wiki/AVHRR</a><br>
<font color="#888888"><br>
<br>
<br>
Hamish<br>
<br>
</font>> From what I understood, the use of r.mapcal seems to be more flexible.<br>
> I am just wondering if there are some code examples using the bitwise<br>
> operators of mapcalc. I found the following code:<br>
> "lst_filt = (lstmap ~ [XX XX XX 00]) || (lstmap ~ [XX XX 0X 01])"<br>
> but to me it is not really clear how this works, especially compared<br>
> to the code provided (and explained) by Glynn Clements:<br>
> r.mapcalc MASK="if((sur_refl_qc_250 / 16) % 16 == 11 , 1, null())"<br>
><br>
> Thank you very much for any help.<br>
><br>
> Laura<br><font color="#888888">
<br>
<br>
</font>2009/6/15 Nikos Alexandris <span dir="ltr"><<a href="mailto:nikos.alexandris@felis.uni-freiburg.de">nikos.alexandris@felis.uni-freiburg.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div id=":zk" class="ii gt">Hi Laura!<br>
<br>
I am sending you some notes of mine off-list. Also, check...<br>
<br>
"In the upcoming release of GRASS (version 7) there is an extra module<br>
to derive such quality layers called i.modis.qc" ;<br>
<br>
Yann Chemin, International Rice Research Institute, The Philippines,<br>
<a href="http://svn.osgeo.org/grass/grass/trunk/imagery/i.modis.qc/i.modis.qc.html" target="_blank">http://svn.osgeo.org/grass/grass/trunk/imagery/i.modis.qc/i.modis.qc.html</a><br>
<br>
Regards, Nikos</div></blockquote><br></blockquote></div><br>