r.le.trace.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. ************************************************************
  3. * MODULE: r.le.patch/r.le.trace.h *
  4. * Version 5.0 Nov. 1, 2001 *
  5. * *
  6. * AUTHOR: W.L. Baker, University of Wyoming *
  7. * BAKERWL@UWYO.EDU *
  8. * *
  9. * PURPOSE: To analyze attributes of patches in a landscape *
  10. * r.le.trace.h lists include files, defines the *
  11. * data structures, and lists the modules for *
  12. * r.le.trace *
  13. * *
  14. * COPYRIGHT: (C) 2001 by W.L. Baker *
  15. * *
  16. * This program is free software under the GNU General *
  17. * Public License(>=v2). Read the file COPYING that comes *
  18. * with GRASS for details *
  19. * *
  20. ************************************************************/
  21. #include <grass/config.h>
  22. #include "stdio.h"
  23. #include "math.h"
  24. #include "ctype.h"
  25. #include "stdlib.h"
  26. #include "string.h"
  27. #include <grass/gis.h>
  28. #define EQ(a, b) (a-b < 0.01 && a-b > -0.01 )
  29. #define BIG 500000000.0
  30. #define MIN 5
  31. #define NULLPTR (PATCH *) 0
  32. typedef struct pt
  33. {
  34. int row, col;
  35. struct pt *next;
  36. } PT;
  37. typedef struct patch
  38. {
  39. double att;
  40. int num, n, s, e, w, npts;
  41. double c_row, c_col;
  42. double area, perim, long_axis;
  43. double edge, core;
  44. int *row;
  45. int *col;
  46. int twist;
  47. float omega;
  48. struct patch *next;
  49. } PATCH;
  50. struct CHOICE
  51. {
  52. char fn[30], out[30];
  53. int patchmap, trace, perim2;
  54. int all;
  55. int boundary[5];
  56. };
  57. void set_map();
  58. void show_patch();
  59. void patch_attr();
  60. void draw_patch();
  61. void scr_cell();
  62. void cell_clip_drv();
  63. void cell_clip();
  64. int is_not_empty_buffer();
  65. int center_is_not_zero();
  66. void trace();
  67. PATCH *get_bd();
  68. int yes_nb();
  69. void clockwise();