Loading...
Searching...
No Matches
lidar.h
Go to the documentation of this file.
/***********************************************************************
*
* MODULE: lidarlib
*
* AUTHOR(S): Roberto Antolin
*
* PURPOSE: LIDAR library
*
* COPYRIGHT: (C) 2006 by Politecnico di Milano -
* Polo Regionale di Como
*
* This program is free software under the
* GNU General Public License (>=v2).
* Read the file COPYING that comes with GRASS
* for details.
*
**************************************************************************/
#ifndef _POLIMIFUNCT_H_
#define _POLIMIFUNCT_H_
#include <grass/gis.h>
#include <grass/gmath.h>
#include <grass/vector.h>
#include <grass/dbmi.h>
#include <grass/raster.h>
#include <grass/segment.h>
#include <grass/glocale.h>
/*----------------------------------------------------------------------------------------------------------*/
/*CONSTANTS DECLARATION */
#define NSPLX_MAX \
150 /* Maximum number of splines along East direction used in the \
subregions interpolation */
#define NSPLY_MAX \
150 /* Maximum number of splines along North direction used in the \
subregions interpolation */
#define OVERLAP_SIZE 10 /* Subregions overlapping size. */
#define LATO 1000 /* Side's size for v.lidar.growing. */
#define CONTOUR 15 /**/
#define GENERAL_ROW 0
#define GENERAL_COLUMN 1
#define FIRST_ROW 2
#define LAST_ROW 3
#define FIRST_COLUMN 4
#define LAST_COLUMN 5
/* FIELDS ID */
#define F_EDGE_DETECTION_CLASS 1
#define F_CLASSIFICATION 2
#define F_INTERPOLATION 3
#define F_COUNTER_OBJ 4
/* PRE-CLASSIFICATION */
#define PRE_TERRAIN 1
#define PRE_EDGE 2
#define PRE_UNKNOWN 3
/* FINAL CLASSIFICATION */
#define TERRAIN_SINGLE 1
#define TERRAIN_DOUBLE 2
#define OBJECT_DOUBLE 3
#define OBJECT_SINGLE 4
/* SINGLE OR DOUBLE PULSE */
#define SINGLE_PULSE 1
#define DOUBLE_PULSE 2
/* INTERPOLATOR */
#define P_BILINEAR 1
#define P_BICUBIC 0
/*----------------------------------------------------------------------------------------------------------*/
/*STRUCTS DECLARATION */
struct Reg_dimens {
double edge_h; /*Horizontal tile edge */
double edge_v; /*Vertical tile edge */
double overlap; /*Tile's overlapping size */
double sn_size; /*South-North side size */
double ew_size; /*East-West side size */
};
struct Point {
double coordX;
double coordY;
double coordZ;
int lineID;
int cat;
};
struct element {
double value;
double residual;
int freq;
};
/*----------------------------------------------------------------------------------------------------------*/
/*FUNCTIONS DECLARATION */
/*zones */
void P_zero_dim(struct Reg_dimens * /**/);
int P_set_dim(struct Reg_dimens *, double, double, int *, int *);
int P_set_regions(struct Cell_head *, /**/
struct bound_box *, /**/
struct bound_box *, /**/ struct Reg_dimens, /**/ int /**/);
int P_get_edge(int, /**/ struct Reg_dimens *, /**/ double, /**/ double /**/);
int P_get_BandWidth(int, /**/ int /**/);
double P_estimate_splinestep(struct Map_info *, double *, double *);
struct Point *P_Read_Vector_Region_Map(struct Map_info *, /**/
struct Cell_head *, /**/
int *, /**/ int, /**/ int /**/);
struct Point *P_Read_Raster_Region_Map(SEGMENT *, /**/
struct Cell_head *, /**/
struct Cell_head *, /**/
int *, /**/ int /**/);
double P_Mean_Calc(struct Cell_head *, /**/ struct Point *, /**/ int /**/);
/*----------------------------------------------------------------------------------------------------------*/
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 * /**/);
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 /**/);
/*----------------------------------------------------------------------------------------------------------*/
int P_Create_Aux2_Table(dbDriver *, /**/ char * /**/);
int P_Create_Aux4_Table(dbDriver *, /**/ char * /**/);
int P_Drop_Aux_Table(dbDriver *, /**/ char * /**/);
/*----------------------------------------------------------------------------------------------------------*/
void P_Aux_to_Raster(double **, /**/ int /**/);
void P_Aux_to_Vector(struct Map_info *, /**/
struct Map_info *, /**/ dbDriver *, /**/ char * /**/);
double **P_Null_Matrix(double ** /**/);
/*---------------------------------------------------------------------------------------*/
/*interpSpline */
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);
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);
void nCorrectLapl(double **N, /* Normal Matrix () */
double lambda, /* */
int xNum, /* */
int yNum, /* */
double deltaX, /* */
double deltaY); /* */
void nCorrectGrad(double **N, double lambda, int xNum, int yNum, double deltaX,
double deltaY);
void obsEstimateBicubic(double **obsV, /* */
double *obsE, /* */
double *parV, /* */
double deltX, /* */
double deltY, /* */
int xNm, /* */
int yNm, /* */
double xMi, /* */
double yMi, /* */
int obsN); /* */
double dataInterpolateBicubic(double x, /* */
double y, /* */
double deltaX, /* */
double deltaY, /* */
int xNum, /* */
int yNum, /* */
double xMin, /* */
double yMin, /* */
double *parVect); /* */
void obsEstimateBilin(double **obsV, double *obsE, double *parV, double deltX,
double deltY, int xNm, int yNm, double xMi, double yMi,
int obsN);
double dataInterpolateBilin(double x, double y, double deltaX, double deltaY,
int xNum, int yNum, double xMin, double yMin,
double *parVect);
#endif
P_Read_Vector_Region_Map
struct Point * P_Read_Vector_Region_Map(struct Map_info *, struct Cell_head *, int *, int, int)
Definition zones.c:322
P_get_edge
int P_get_edge(int, struct Reg_dimens *, double, double)
Definition zones.c:196
P_Read_Raster_Region_Map
struct Point * P_Read_Raster_Region_Map(SEGMENT *, struct Cell_head *, struct Cell_head *, int *, int)
Definition zones.c:387
P_get_BandWidth
int P_get_BandWidth(int, int)
Definition zones.c:218
dataInterpolateBicubic
double dataInterpolateBicubic(double x, double y, double deltaX, double deltaY, int xNum, int yNum, double xMin, double yMin, double *parVect)
Definition InterpSpline.c:497
P_Aux_to_Raster
void P_Aux_to_Raster(double **, int)
Definition zones.c:540
normalDefBicubic
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:107
normalDefBilin
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:291
P_zero_dim
void P_zero_dim(struct Reg_dimens *)
Definition zones.c:9
P_Aux_to_Vector
void P_Aux_to_Vector(struct Map_info *, struct Map_info *, dbDriver *, char *)
Definition zones.c:565
obsEstimateBilin
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:556
P_Create_Aux2_Table
int P_Create_Aux2_Table(dbDriver *, char *)
Definition zones.c:465
P_Drop_Aux_Table
int P_Drop_Aux_Table(dbDriver *, char *)
Definition zones.c:529
P_Regular_Points
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 lidar/raster.c:199
dataInterpolateBilin
double dataInterpolateBilin(double x, double y, double deltaX, double deltaY, int xNum, int yNum, double xMin, double yMin, double *parVect)
Definition InterpSpline.c:604
P_set_regions
int P_set_regions(struct Cell_head *, struct bound_box *, struct bound_box *, struct Reg_dimens, int)
Definition zones.c:53
nCorrectGrad
void nCorrectGrad(double **N, double lambda, int xNum, int yNum, double deltaX, double deltaY)
Definition InterpSpline.c:399
P_estimate_splinestep
double P_estimate_splinestep(struct Map_info *, double *, double *)
Definition zones.c:259
P_Null_Matrix
double ** P_Null_Matrix(double **)
P_Mean_Calc
double P_Mean_Calc(struct Cell_head *, struct Point *, int)
Definition zones.c:231
P_Create_Aux4_Table
int P_Create_Aux4_Table(dbDriver *, char *)
Definition zones.c:493
obsEstimateBicubic
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:434
P_Sparse_Points
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 lidar/raster.c:9
P_set_dim
int P_set_dim(struct Reg_dimens *, double, double, int *, int *)
Definition zones.c:117
nCorrectLapl
void nCorrectLapl(double **N, double lambda, int xNum, int yNum, double deltaX, double deltaY)
Definition InterpSpline.c:199
Point
Definition lidar.h:77
Point::cat
int cat
Definition lidar.h:82
Point::lineID
int lineID
Definition lidar.h:81
Point::coordY
double coordY
Definition lidar.h:79
Point::coordX
double coordX
Definition lidar.h:78
Point::coordZ
double coordZ
Definition lidar.h:80
Reg_dimens
Definition lidar.h:69
Reg_dimens::edge_v
double edge_v
Definition lidar.h:71
Reg_dimens::edge_h
double edge_h
Definition lidar.h:70
Reg_dimens::ew_size
double ew_size
Definition lidar.h:74
Reg_dimens::overlap
double overlap
Definition lidar.h:72
Reg_dimens::sn_size
double sn_size
Definition lidar.h:73
element
Definition lidar.h:85
element::residual
double residual
Definition lidar.h:87
element::value
double value
Definition lidar.h:86
element::freq
int freq
Definition lidar.h:88
x
#define x