mod09A1a.c 717 B

1234567891011121314151617181920212223
  1. /* MODLAND QA Bits 500m long int bits[0-1]
  2. * 00 -> class 0: Corrected product produced at ideal quality -- all bands
  3. * 01 -> class 1: Corrected product produced at less than idel quality -- some or all bands
  4. * 10 -> class 2: Corrected product NOT produced due to cloud effect -- all bands
  5. * 11 -> class 3: Corrected product NOT produced due to other reasons -- some or all bands mayb be fill value (Note that a value of [11] overrides a value of [01])
  6. */
  7. #include <grass/raster.h>
  8. CELL mod09A1a(CELL pixel)
  9. {
  10. CELL qctemp;
  11. /* Select bit 0 and 1 (right-side).
  12. * hexadecimal "0x03" => binary "11"
  13. * this will set all other bits to null */
  14. qctemp = pixel & 0x03;
  15. return qctemp;
  16. }