[GRASSLIST:5994] r.bitpattern usage

Trevor Wiens twiens at interbaun.com
Thu Mar 3 18:26:19 EST 2005


Markus was kind enough to let me have r.bitpattern (which will show up in GRASS after the 6.0 release), but I'm a bit unsure of the usage. Perhaps either he or Radim can help me with a basic use question as I want to make sure I've got this right.

I'm processing MODIS data and the bit layout is 

x x x xx x x x xx xxxx xx

Now the bit of interest to me is in the 32 position which tells me if the vegetation index is still within the useful quality range.

>From my understanding I should run the command as follows:

r.bitpattern input=M2000.EVI.quality output=test pattern=32 patval=0 

This will check for a 0 value in the 6 position from the right and create a layer called "test" (in my example).
Now if the value of 0 IS found the output layer's pixel value will be 1.
If the value of 0 is NOT found, the output layer's pixel value will be 0.

Right?

T
-- 
Trevor Wiens 
twiens at interbaun.com

The significant problems that we face cannot be solved at the same 
level of thinking we were at when we created them. 
(Albert Einstein)




More information about the grass-user mailing list