contour.h 888 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <grass/raster.h>
  4. #include "flag.h"
  5. #define NODE struct _n_o_d_e_
  6. #define INIT_AR 64
  7. #define AR_INCR 64
  8. #define ABS(x) (((x) < 0) ? -(x) : (x))
  9. #define MIN(x,y) (((x) < (y)) ? (x) : (y))
  10. #define TST(x) /* fprintf(stderr,"(x):%d\n",(x)) */
  11. #define TSTSTR(x) /* fprintf(stderr,"%s\n",(x)) */
  12. NODE {
  13. int r, c;
  14. double d;
  15. };
  16. extern int nrows;
  17. extern int ncols;
  18. extern int minc;
  19. extern int minr;
  20. extern int maxc;
  21. extern int maxr;
  22. extern int array_size;
  23. extern double i_val_l_f;
  24. extern DCELL **con;
  25. extern FLAG *seen, *mask;
  26. extern NODE *zero;
  27. /* add_in.c */
  28. NODE *add_in(int, int, int, int, NODE *, int *);
  29. /* addpts.c */
  30. NODE *addpts(NODE *, int, int, int, int, int *);
  31. /* find_con.c */
  32. int find_con(int, int, double *, double *, DCELL *, DCELL *);
  33. /* read_cell.c */
  34. DCELL **read_cell(const char *);
  35. void free_cell(DCELL **);