normal.c 792 B

123456789101112131415161718192021222324252627282930
  1. #include <grass/gis.h>
  2. #include "options.h"
  3. #include "local_proto.h"
  4. void normal(struct Cell_head *window, struct Categories *cats,
  5. int simple, FILE * fp)
  6. {
  7. char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
  8. G_unqualified_name(map_name, G_mapset(), xname, xmapset);
  9. fprintf(fp, ".C %s\n", color);
  10. fprintf(fp, ".S %f\n", size);
  11. if (simple) {
  12. fprintf(fp, "%s\n", map_name);
  13. }
  14. else {
  15. fprintf(fp, "LOCATION: %s\n", G_location());
  16. fprintf(fp, "%s in %s\n", xname, xmapset);
  17. fprintf(fp, "%s\n", cats->title);
  18. fprintf(fp, "North: %10.2f South: %10.2f\n",
  19. window->north, window->south);
  20. fprintf(fp, "West: %10.2f East: %10.2f\n",
  21. window->west, window->east);
  22. fprintf(fp, "Resolution: n-s: %7.2f e-w: %7.2f\n",
  23. window->ns_res, window->ns_res);
  24. }
  25. }