local_proto.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __LOCAL_PROTO_H__
  2. #define __LOCAL_PHOTO_H__
  3. #include <grass/raster.h>
  4. /* raster_ptr.c: From Huidae Cho ... */
  5. union RASTER_PTR
  6. {
  7. void *v;
  8. CELL *c;
  9. FCELL *f;
  10. DCELL *d;
  11. };
  12. struct RASTER_MAP_PTR
  13. {
  14. RASTER_MAP_TYPE type;
  15. union RASTER_PTR data;
  16. };
  17. int is_null_value(struct RASTER_MAP_PTR buf, int col);
  18. /* End from Huidae Cho */
  19. #ifdef HAVE_LONG_LONG_INT
  20. typedef unsigned long long gcell_count;
  21. #else
  22. typedef unsigned long gcell_count;
  23. #endif
  24. /* Put all the state information into a struct */
  25. struct rr_state
  26. {
  27. char *inraster, *inrcover, *outraster, *outvector;
  28. int use_nulls, docover, fd_old, fd_cold, fd_new;
  29. gcell_count nCells, nNulls, nRand, cnCells, cnNulls;
  30. struct RASTER_MAP_PTR nulls, cnulls, buf, cover, min, max, cmin, cmax;
  31. FILE *fsites;
  32. int z_geometry;
  33. int notopol;
  34. };
  35. /* count.c */
  36. void get_stats(struct rr_state *);
  37. /* random.c */
  38. int execute_random(struct rr_state *);
  39. /* support.c */
  40. int make_support(struct rr_state *, int, double);
  41. #endif /* __LOCAL_PROTO_H__ */
  42. /* vim: set softtabstop=4 shiftwidth=4 expandtab: */