main.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /****************************************************************************
  2. *
  3. * MODULE: r.param.scale
  4. * AUTHOR(S): Jo Wood, V 1.1, 11th December, 1994 (original contributor)
  5. * PURPOSE: GRASS module for extracting multi-scale surface parameters.
  6. * COPYRIGHT: (C) 1999-2004 by the GRASS Development Team
  7. *
  8. * This program is free software under the GNU General Public
  9. * License (>=v2). Read the file COPYING that comes with GRASS
  10. * for details.
  11. *
  12. *****************************************************************************/
  13. #include <grass/glocale.h>
  14. #include "param.h"
  15. const char *rast_in_name; /* Name of the raster file to process. */
  16. const char *rast_out_name; /* Name of the raster output file. */
  17. int constrained; /* Flag that forces quadtratic through */
  18. /* the central cell of the window. */
  19. int
  20. fd_in, /* File descriptor for input and */
  21. fd_out, /* output raster files. */
  22. wsize, /* Size of local processing window. */
  23. mparam; /* Morphometric parameter to calculate. */
  24. double
  25. resoln, /* Planimetric resolution. */
  26. exponent, /* Distance weighting exponent. */
  27. zscale, /* Vertical scaling factor. */
  28. slope_tol, /* Vertical tolerences for surface */
  29. curve_tol; /* feature identification. */
  30. int main(int argc, char **argv)
  31. {
  32. interface(argc, argv);
  33. /* Make sure that the current projection is not lat/long */
  34. if ((G_projection() == PROJECTION_LL))
  35. G_fatal_error(_("Lat/Long locations are not supported by this module"));
  36. open_files();
  37. process();
  38. close_down();
  39. if (mparam == FEATURE) {
  40. write_cols();
  41. write_cats();
  42. }
  43. return 0;
  44. }