grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

lidar.h
Go to the documentation of this file.
1
2/***********************************************************************
3 *
4 * MODULE: lidarlib
5 *
6 * AUTHOR(S): Roberto Antolin
7 *
8 * PURPOSE: LIDAR library
9 *
10 * COPYRIGHT: (C) 2006 by Politecnico di Milano -
11 * Polo Regionale di Como
12 *
13 * This program is free software under the
14 * GNU General Public License (>=v2).
15 * Read the file COPYING that comes with GRASS
16 * for details.
17 *
18 **************************************************************************/
19
20#ifndef _POLIMIFUNCT_H_
21#define _POLIMIFUNCT_H_
22
23#include <grass/gis.h>
24#include <grass/gmath.h>
25#include <grass/vector.h>
26#include <grass/dbmi.h>
27#include <grass/raster.h>
28#include <grass/segment.h>
29#include <grass/glocale.h>
30
31/*----------------------------------------------------------------------------------------------------------*/
32/*CONSTANTS DECLARATION */
33
34#define NSPLX_MAX 150 /* Maximum number of splines along East direction used in the subregions interpolation */
35#define NSPLY_MAX 150 /* Maximum number of splines along North direction used in the subregions interpolation */
36#define OVERLAP_SIZE 10 /* Subregions overlapping size. */
37#define LATO 1000 /* Side's size for v.lidar.growing. */
38#define CONTOUR 15 /**/
39#define GENERAL_ROW 0
40#define GENERAL_COLUMN 1
41#define FIRST_ROW 2
42#define LAST_ROW 3
43#define FIRST_COLUMN 4
44#define LAST_COLUMN 5
45 /* FIELDS ID */
46#define F_EDGE_DETECTION_CLASS 1
47#define F_CLASSIFICATION 2
48#define F_INTERPOLATION 3
49#define F_COUNTER_OBJ 4
50 /* PRE-CLASSIFICATION */
51#define PRE_TERRAIN 1
52#define PRE_EDGE 2
53#define PRE_UNKNOWN 3
54 /* FINAL CLASSIFICATION */
55#define TERRAIN_SINGLE 1
56#define TERRAIN_DOUBLE 2
57#define OBJECT_DOUBLE 3
58#define OBJECT_SINGLE 4
59 /* SINGLE OR DOUBLE PULSE */
60#define SINGLE_PULSE 1
61#define DOUBLE_PULSE 2
62 /* INTERPOLATOR */
63#define P_BILINEAR 1
64#define P_BICUBIC 0
65
66/*----------------------------------------------------------------------------------------------------------*/
67 /*STRUCTS DECLARATION */
69{
70 double edge_h; /*Horizontal tile edge */
71 double edge_v; /*Vertical tile edge */
72 double overlap; /*Tile's overlapping size */
73 double sn_size; /*South-North side size */
74 double ew_size; /*East-West side size */
75};
76
77struct Point
78{
79 double coordX;
80 double coordY;
81 double coordZ;
82 int lineID;
83 int cat;
84};
85
86struct element
87{
88 double value;
89 double residual;
90 int freq;
91};
92
93/*----------------------------------------------------------------------------------------------------------*/
94/*FUNCTIONS DECLARATION */
95/*zones */
96void P_zero_dim(struct Reg_dimens * /**/);
97int P_set_dim(struct Reg_dimens *, double, double, int *, int *);
98
99int P_set_regions(struct Cell_head *, /**/
100 struct bound_box *, /**/
101 struct bound_box *, /**/ struct Reg_dimens, /**/ int /**/);
102
103int P_get_edge(int, /**/ struct Reg_dimens *, /**/ double, /**/ double /**/);
104
105int P_get_BandWidth(int, /**/ int /**/);
106
107double P_estimate_splinestep(struct Map_info *, double *, double *);
108
109struct Point *P_Read_Vector_Region_Map(struct Map_info *, /**/
110 struct Cell_head *, /**/
111 int *, /**/ int, /**/ int /**/);
112
114 struct Cell_head *, /**/
115 struct Cell_head *, /**/
116 int *, /**/ int /**/);
117
118double P_Mean_Calc(struct Cell_head *, /**/ struct Point *, /**/ int /**/);
119
120/*----------------------------------------------------------------------------------------------------------*/
121void
122P_Sparse_Points(struct Map_info *, /**/
123 struct Cell_head *, /**/
124 struct bound_box, /**/
125 struct bound_box, /**/
126 double **, /**/
127 double *, /**/
128 int *, /**/
129 double, /**/
130 double, /**/
131 double, /**/
132 int, /**/
133 int, /**/
134 int, /**/
135 int, /**/
136 struct line_cats *, /**/
137 dbDriver *, /**/ double, /**/ char * /**/);
138
139int P_Regular_Points(struct Cell_head *, /**/
140 struct Cell_head *, /**/
141 struct bound_box, /**/
142 struct bound_box, /**/
143 SEGMENT *, /**/
144 double *, /**/
145 double, /**/
146 double, /**/
147 double, /**/
148 double, /**/
149 int, /**/ int, /**/ int, /**/ int, /**/ int /**/);
150
151/*----------------------------------------------------------------------------------------------------------*/
152int P_Create_Aux2_Table(dbDriver *, /**/ char * /**/);
153
154int P_Create_Aux4_Table(dbDriver *, /**/ char * /**/);
155
156int P_Drop_Aux_Table(dbDriver *, /**/ char * /**/);
157
158/*----------------------------------------------------------------------------------------------------------*/
159void P_Aux_to_Raster(double **, /**/ int /**/);
160
161void P_Aux_to_Vector(struct Map_info *, /**/
162 struct Map_info *, /**/ dbDriver *, /**/ char * /**/);
163
164double **P_Null_Matrix(double ** /**/);
165
166/*---------------------------------------------------------------------------------------*/
167/*interpSpline */
168void normalDefBicubic(double **N, double *TN, double *Q, double **obsVect,
169 double deltaX, double deltaY, int xNum, int yNum,
170 double xMin, double yMin, int obsNum, int parNum,
171 int BW);
172
173void normalDefBilin(double **N, double *TN, double *Q, double **obsVect,
174 double deltaX, double deltaY, int xNum, int yNum,
175 double xMin, double yMin, int obsNum, int parNum, int BW);
176
177void nCorrectLapl(double **N, /* Normal Matrix () */
178 double lambda, /* */
179 int xNum, /* */
180 int yNum, /* */
181 double deltaX, /* */
182 double deltaY); /* */
183
184void nCorrectGrad(double **N, double lambda, int xNum, int yNum,
185 double deltaX, double deltaY);
186
187void obsEstimateBicubic(double **obsV, /* */
188 double *obsE, /* */
189 double *parV, /* */
190 double deltX, /* */
191 double deltY, /* */
192 int xNm, /* */
193 int yNm, /* */
194 double xMi, /* */
195 double yMi, /* */
196 int obsN); /* */
197
198double dataInterpolateBicubic(double x, /* */
199 double y, /* */
200 double deltaX, /* */
201 double deltaY, /* */
202 int xNum, /* */
203 int yNum, /* */
204 double xMin, /* */
205 double yMin, /* */
206 double *parVect); /* */
207
208void obsEstimateBilin(double **obsV, double *obsE, double *parV, double deltX,
209 double deltY, int xNm, int yNm, double xMi, double yMi,
210 int obsN);
211
212double dataInterpolateBilin(double x, double y, double deltaX, double deltaY,
213 int xNum, int yNum, double xMin, double yMin,
214 double *parVect);
215
216#endif
static double Q(double x)
Definition: area_poly1.c:30
#define N
Definition: e_intersect.c:923
struct Point * P_Read_Vector_Region_Map(struct Map_info *, struct Cell_head *, int *, int, int)
Definition: zones.c:312
int P_get_edge(int, struct Reg_dimens *, double, double)
Definition: zones.c:187
struct Point * P_Read_Raster_Region_Map(SEGMENT *, struct Cell_head *, struct Cell_head *, int *, int)
Definition: zones.c:379
int P_get_BandWidth(int, int)
Definition: zones.c:208
double dataInterpolateBicubic(double x, double y, double deltaX, double deltaY, int xNum, int yNum, double xMin, double yMin, double *parVect)
Definition: InterpSpline.c:533
void P_Aux_to_Raster(double **, int)
Definition: zones.c:534
void normalDefBicubic(double **N, double *TN, double *Q, double **obsVect, double deltaX, double deltaY, int xNum, int yNum, double xMin, double yMin, int obsNum, int parNum, int BW)
Definition: InterpSpline.c:108
void normalDefBilin(double **N, double *TN, double *Q, double **obsVect, double deltaX, double deltaY, int xNum, int yNum, double xMin, double yMin, int obsNum, int parNum, int BW)
Definition: InterpSpline.c:313
void P_zero_dim(struct Reg_dimens *)
Definition: zones.c:9
void P_Aux_to_Vector(struct Map_info *, struct Map_info *, dbDriver *, char *)
Definition: zones.c:560
void obsEstimateBilin(double **obsV, double *obsE, double *parV, double deltX, double deltY, int xNm, int yNm, double xMi, double yMi, int obsN)
Definition: InterpSpline.c:595
int P_Create_Aux2_Table(dbDriver *, char *)
Definition: zones.c:457
int P_Drop_Aux_Table(dbDriver *, char *)
Definition: zones.c:523
int P_Regular_Points(struct Cell_head *, struct Cell_head *, struct bound_box, struct bound_box, SEGMENT *, double *, double, double, double, double, int, int, int, int, int)
Definition: raster.c:190
double dataInterpolateBilin(double x, double y, double deltaX, double deltaY, int xNum, int yNum, double xMin, double yMin, double *parVect)
Definition: InterpSpline.c:644
int P_set_regions(struct Cell_head *, struct bound_box *, struct bound_box *, struct Reg_dimens, int)
Definition: zones.c:54
void nCorrectGrad(double **N, double lambda, int xNum, int yNum, double deltaX, double deltaY)
Definition: InterpSpline.c:432
double P_estimate_splinestep(struct Map_info *, double *, double *)
Definition: zones.c:249
double ** P_Null_Matrix(double **)
double P_Mean_Calc(struct Cell_head *, struct Point *, int)
Definition: zones.c:222
int P_Create_Aux4_Table(dbDriver *, char *)
Definition: zones.c:486
void obsEstimateBicubic(double **obsV, double *obsE, double *parV, double deltX, double deltY, int xNm, int yNm, double xMi, double yMi, int obsN)
Definition: InterpSpline.c:467
void P_Sparse_Points(struct Map_info *, struct Cell_head *, struct bound_box, struct bound_box, double **, double *, int *, double, double, double, int, int, int, int, struct line_cats *, dbDriver *, double, char *)
Definition: raster.c:9
int P_set_dim(struct Reg_dimens *, double, double, int *, int *)
Definition: zones.c:119
void nCorrectLapl(double **N, double lambda, int xNum, int yNum, double deltaX, double deltaY)
Definition: InterpSpline.c:211
2D/3D raster map header (used also for region)
Definition: gis.h:414
Vector map info.
Definition: dig_structs.h:1260
Definition: lidar.h:78
int cat
Definition: lidar.h:83
int lineID
Definition: lidar.h:82
double coordY
Definition: lidar.h:80
double coordX
Definition: lidar.h:79
double coordZ
Definition: lidar.h:81
double edge_v
Definition: lidar.h:71
double edge_h
Definition: lidar.h:70
double ew_size
Definition: lidar.h:74
double overlap
Definition: lidar.h:72
double sn_size
Definition: lidar.h:73
Bounding box.
Definition: dig_structs.h:66
Definition: lidar.h:87
double residual
Definition: lidar.h:89
double value
Definition: lidar.h:88
int freq
Definition: lidar.h:90
Feature category info.
Definition: dig_structs.h:1703
#define x