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