main.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. **********************************************************************
  3. *
  4. * MODULE: r.support.stats
  5. *
  6. * AUTHOR(S): Brad Douglas <rez touchofmadness com>
  7. *
  8. * PURPOSE: Update raster statistics
  9. *
  10. * COPYRIGHT: (C) 2006 by the GRASS Development Team
  11. *
  12. * This program is free software under the GNU General
  13. * Purpose License (>=v2). Read the file COPYING that
  14. * comes with GRASS for details.
  15. *
  16. ***********************************************************************/
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #include <grass/gis.h>
  20. #include <grass/glocale.h>
  21. #include "local_proto.h"
  22. int main(int argc, char *argv[])
  23. {
  24. struct GModule *module;
  25. struct
  26. {
  27. struct Option *raster;
  28. } parm;
  29. /* Initialize GIS engine */
  30. G_gisinit(argv[0]);
  31. module = G_define_module();
  32. module->description = _("Update raster map statistics");
  33. G_add_keyword(_("raster"));
  34. G_add_keyword(_("statistics"));
  35. parm.raster = G_define_standard_option(G_OPT_R_MAP);
  36. /* parse command-line options */
  37. if (G_parser(argc, argv))
  38. exit(EXIT_FAILURE);
  39. check_stats(parm.raster->answer);
  40. G_message(_("Statistics for <%s> updated"), parm.raster->answer);
  41. return EXIT_SUCCESS;
  42. }