mod09Q1b.c 354 B

123456789101112131415161718192021
  1. /* Cloud State 250m Unsigned Int bits[2-3]
  2. * 00 -> class 0: Clear -- No clouds
  3. * 01 -> class 1: Cloudy
  4. * 10 -> class 2: Mixed
  5. * 11 -> class 3: Not Set ; Assumed Clear
  6. */
  7. #include <grass/raster.h>
  8. CELL mod09Q1b(CELL pixel)
  9. {
  10. CELL qctemp;
  11. pixel >>= 2; /*bits [2-3] become [0-1] */
  12. qctemp = pixel & 0x03;
  13. return qctemp;
  14. }