GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
dataquad.h
Go to the documentation of this file.
1 /*!
2  * \file qtree.c
3  *
4  * \author
5  * H. Mitasova, I. Kosinovsky, D. Gerdes, Fall 1993,
6  * University of Illinois and
7  * US Army Construction Engineering Research Lab
8  *
9  * \author H. Mitasova (University of Illinois),
10  * \author I. Kosinovsky, (USA-CERL)
11  * \author D.Gerdes (USA-CERL)
12  *
13  * \author modified by H. Mitasova, November 1996 (include variable smoothing)
14  *
15  * \copyright
16  * (C) 1993-1996 by Helena Mitasova and the GRASS Development Team
17  *
18  * \copyright
19  * This program is free software under the
20  * GNU General Public License (>=v2).
21  * Read the file COPYING that comes with GRASS for details.
22  */
23 
24 
25 #ifndef DATAQUAD_H
26 
27 #define DATAQUAD_H
28 
29 #define NW 1
30 #define NE 2
31 #define SW 3
32 #define SE 4
33 
34 
35 /*!
36  * Point structure to keep coordinates
37  *
38  * It also contains smoothing for the given point.
39  */
40 struct triple
41 {
42  double x;
43  double y;
44  double z;
45  double sm; /*!< variable smoothing */
46 };
47 
48 struct quaddata
49 {
50  double x_orig;
51  double y_orig;
52  double xmax;
53  double ymax;
54  int n_rows;
55  int n_cols;
56  int n_points;
57  struct triple *points;
58 };
59 
60 struct triple *quad_point_new(double, double, double, double);
61 struct quaddata *quad_data_new(double, double, double, double, int, int, int,
62  int);
63 int quad_compare(struct triple *, struct quaddata *);
64 int quad_add_data(struct triple *, struct quaddata *, double);
65 int quad_intersect(struct quaddata *, struct quaddata *);
66 int quad_division_check(struct quaddata *, int);
67 struct quaddata **quad_divide_data(struct quaddata *, int, double);
68 int quad_get_points(struct quaddata *, struct quaddata *, int);
69 
70 #endif
double y_orig
Definition: dataquad.h:51
struct triple * quad_point_new(double, double, double, double)
Definition: dataquad.c:38
double z
Definition: dataquad.h:44
struct quaddata * quad_data_new(double, double, double, double, int, int, int, int)
Definition: dataquad.c:62
double x_orig
Definition: dataquad.h:50
struct triple * points
Definition: dataquad.h:57
int quad_add_data(struct triple *, struct quaddata *, double)
Definition: dataquad.c:143
double x
Definition: dataquad.h:42
double sm
Definition: dataquad.h:45
double ymax
Definition: dataquad.h:53
int quad_intersect(struct quaddata *, struct quaddata *)
Definition: dataquad.c:180
double xmax
Definition: dataquad.h:52
int n_rows
Definition: dataquad.h:54
int quad_division_check(struct quaddata *, int)
Definition: dataquad.c:219
int n_cols
Definition: dataquad.h:55
int quad_get_points(struct quaddata *, struct quaddata *, int)
Definition: dataquad.c:323
double y
Definition: dataquad.h:43
int quad_compare(struct triple *, struct quaddata *)
Definition: dataquad.c:98
struct quaddata ** quad_divide_data(struct quaddata *, int, double)
Definition: dataquad.c:237
int n_points
Definition: dataquad.h:56