mod09A1sc.c 493 B

12345678910111213141516171819202122232425
  1. /* LAND/WATER FLAG unsigned int bits[3-5]
  2. * 000 -> class 0: Shallow ocean
  3. * 001 -> class 1: Land
  4. * 010 -> class 2: Ocean coastlines and lake shorelines
  5. * 011 -> class 3: Shallow inland water
  6. * 100 -> class 4: Ephemeral water
  7. * 101 -> class 5: Deep inland water
  8. * 110 -> class 6: Continental/moderate ocean
  9. * 111 -> class 7: Deep ocean
  10. */
  11. #include <grass/raster.h>
  12. CELL mod09A1sc(CELL pixel)
  13. {
  14. CELL qctemp;
  15. pixel >>= 3;
  16. qctemp = pixel & 0x07;
  17. return qctemp;
  18. }