site.h 1002 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef GRASS_SITE_H
  2. #define GRASS_SITE_H
  3. #include <grass/raster.h>
  4. #include <grass/vector.h>
  5. #define MAX_SITE_STRING 1024
  6. #define MAX_SITE_LEN 4096
  7. typedef struct
  8. {
  9. double east, north;
  10. double *dim;
  11. int dim_alloc;
  12. RASTER_MAP_TYPE cattype;
  13. CELL ccat;
  14. FCELL fcat;
  15. DCELL dcat;
  16. int str_alloc;
  17. char **str_att;
  18. int dbl_alloc;
  19. double *dbl_att;
  20. } Site;
  21. typedef struct
  22. {
  23. const char *name, *desc, *form, *labels, *stime;
  24. struct TimeStamp *time;
  25. } Site_head;
  26. /* Some defines for which column type to use */
  27. #define SITE_COL_NUL 0
  28. #define SITE_COL_DIM 1
  29. #define SITE_COL_DBL 2
  30. #define SITE_COL_STR 3
  31. /*!
  32. \brief XYZ site struct.
  33. Note the use of a union for the cat value is different than the Site
  34. struct.
  35. */
  36. typedef struct
  37. {
  38. double x, y, z;
  39. RASTER_MAP_TYPE cattype;
  40. union
  41. {
  42. double d;
  43. float f;
  44. int c;
  45. } cat;
  46. } SITE_XYZ;
  47. struct zstruct
  48. {
  49. double x, y, z;
  50. };
  51. typedef struct zstruct Z;
  52. #include <grass/defs/site.h>
  53. #endif