local_proto.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #include <grass/raster.h>
  2. #define MAP_TYPE_RASTER2D 1
  3. #define MAP_TYPE_RASTER3D 2
  4. /* possibles for the future:
  5. #define MAP_TYPE_VECTOR 3
  6. #define MAP_TYPE_RULES 4
  7. */
  8. struct stat_node
  9. {
  10. long int cat; /* cell-file category value */
  11. long int stat; /* statistic: number of cells with that cat */
  12. struct stat_node *next; /* pointer to next stat_node in list */
  13. };
  14. struct stat_list
  15. {
  16. struct stat_node *ptr; /* pointer to first stat_node in list */
  17. long int count, /* number of stat_nodes in list
  18. (not counting null cells) */
  19. null_stat, /* stats for null cell */
  20. maxstat, /* max. statistic in list */
  21. minstat, /* min. statistic in list */
  22. sumstat, /* sum of all statistics in list */
  23. maxcat, /* max. cell-file category value in list */
  24. mincat; /* min. cell-file category value in list */
  25. };
  26. /* histogram.c */
  27. double histogram(const char *, int, int, int, int, int, int, int, int,
  28. int, struct FPRange, int);
  29. /* get_stats.c */
  30. void get_stats(const char *, struct stat_list *, int, int);
  31. void run_stats(const char *, int, const char *, int);
  32. /* draw.c */
  33. void draw(const char *, int, int, int, int, int, int, int, int, int, int, int,
  34. int, struct Categories, struct Colors, double, double, double,
  35. double, int, int, double, double, double *, int, int, int, double,
  36. double, const char *, double *, double, int, int, struct Option *,
  37. struct Option *, struct Option *, struct Option *, struct Option *,
  38. struct Flag *, struct Flag *, int, int, int, char *);