readcell.c 360 B

123456789101112131415161718
  1. #include <unistd.h>
  2. #include <grass/gis.h>
  3. #include <grass/raster.h>
  4. #include "ncb.h"
  5. #include "local_proto.h"
  6. int readcell(int fd, int row, int nrows, int ncols)
  7. {
  8. rotate_bufs();
  9. if (row < nrows)
  10. Rast_get_d_row(fd, ncb.buf[ncb.nsize - 1] + ncb.dist, row);
  11. else
  12. Rast_set_d_null_value(ncb.buf[ncb.nsize - 1] + ncb.dist, ncols);
  13. return 0;
  14. }