[GRASS-user] bitpattern analysis

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Mon Jun 15 07:46:18 EDT 2009


On Mon, 2009-06-15 at 11:06 +0100, Laura Poggio wrote:
> 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) 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 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 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

Hi Laura!

I am sending you some notes of mine off-list. Also, check...

"In the upcoming release of GRASS (version 7) there is an extra module
to derive such quality layers called i.modis.qc" ;

Yann Chemin, International Rice Research Institute, The Philippines,
http://svn.osgeo.org/grass/grass/trunk/imagery/i.modis.qc/i.modis.qc.html

Regards, Nikos



More information about the grass-user mailing list