GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
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 #ifndef DATAQUAD_H
25 
26 #define DATAQUAD_H
27 
28 #define NW 1
29 #define NE 2
30 #define SW 3
31 #define SE 4
32 
33 /*!
34  * Point structure to keep coordinates
35  *
36  * It also contains smoothing for the given point.
37  */
38 struct triple {
39  double x;
40  double y;
41  double z;
42  double sm; /*!< variable smoothing */
43 };
44 
45 struct quaddata {
46  double x_orig;
47  double y_orig;
48  double xmax;
49  double ymax;
50  int n_rows;
51  int n_cols;
52  int n_points;
53  struct triple *points;
54 };
55 
56 struct triple *quad_point_new(double, double, double, double);
57 struct quaddata *quad_data_new(double, double, double, double, int, int, int,
58  int);
59 int quad_compare(struct triple *, struct quaddata *);
60 int quad_add_data(struct triple *, struct quaddata *, double);
61 int quad_intersect(struct quaddata *, struct quaddata *);
62 int quad_division_check(struct quaddata *, int);
63 struct quaddata **quad_divide_data(struct quaddata *, int, double);
64 int quad_get_points(struct quaddata *, struct quaddata *, int);
65 
66 #endif
struct quaddata ** quad_divide_data(struct quaddata *, int, double)
Definition: dataquad.c:226
int quad_get_points(struct quaddata *, struct quaddata *, int)
Definition: dataquad.c:305
int quad_intersect(struct quaddata *, struct quaddata *)
Definition: dataquad.c:176
int quad_add_data(struct triple *, struct quaddata *, double)
Definition: dataquad.c:139
struct triple * quad_point_new(double, double, double, double)
Definition: dataquad.c:36
int quad_division_check(struct quaddata *, int)
Definition: dataquad.c:209
int quad_compare(struct triple *, struct quaddata *)
Definition: dataquad.c:95
struct quaddata * quad_data_new(double, double, double, double, int, int, int, int)
Definition: dataquad.c:59
double ymax
Definition: dataquad.h:49
double y_orig
Definition: dataquad.h:47
double x_orig
Definition: dataquad.h:46
struct triple * points
Definition: dataquad.h:53
int n_points
Definition: dataquad.h:52
double xmax
Definition: dataquad.h:48
int n_cols
Definition: dataquad.h:51
int n_rows
Definition: dataquad.h:50
double z
Definition: dataquad.h:41
double sm
Definition: dataquad.h:42
double x
Definition: dataquad.h:39
double y
Definition: dataquad.h:40