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.
Thank you for the links that helped to understand more how the things are working within GRASS.
For the moment I decided to use
r.mapcalc QA_field1=“(QA>>bit_position_field1)% bit_length_field1”
for the different fields and then combining the files obtained into a mask.
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.
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())”