~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to vector/v.lidar.growing/growing.h

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <grass/gis.h>
 
2
#include <grass/vector.h>
 
3
#include <grass/dbmi.h>
 
4
#include <grass/raster.h>
 
5
#include <grass/glocale.h>
 
6
#include <grass/lidar.h>
 
7
 
 
8
/*--------------------------------------------------------------------------*/
 
9
/* Definitions for Convex-Hull algorithm */
 
10
#define NR_END 1
 
11
#define FREE_ARG char*
 
12
 
 
13
#define CMPM(c,A,B) \
 
14
v = (*(double**)A)[c] - (*(double**)B)[c];\
 
15
if (v>0) return 1;\
 
16
if (v<0) return -1;
 
17
 
 
18
/*--------------------------------------------------------------------------*/
 
19
/*STRUCTS DECLARATION */
 
20
struct element_grow
 
21
{
 
22
    double interp;              /* Interpolated value */
 
23
    int fi;                     /* Interpolated value counter */
 
24
    int bordo;                  /* Border point */
 
25
    int dueImp;                 /* Double impulse point */
 
26
    double orig;                /* Original value */
 
27
    int fo;                     /* Original value counter */
 
28
    double clas;                /* Classification */
 
29
    int fc;                     /* Classification counter */
 
30
    int obj;                    /* Object counter */
 
31
};
 
32
 
 
33
 
 
34
/*--------------------------------------------------------------------------*/
 
35
/*FUNCTIONS DECLARATION */
 
36
void P_Aux_to_Coor(struct Map_info *, /**/
 
37
                   struct Map_info *, /**/ dbDriver *, /**/ FILE * /**/);
 
38
 
 
39
/* Convex-Hull */
 
40
struct element_grow **P_alloc_element(int, int);
 
41
double **Pvector(long, long);
 
42
double pianOriz(double **, int, double *, double *, double *, double *,
 
43
                struct element_grow **, int);
 
44
void nrerror(char error_text[]);
 
45
void regGrow8(struct Cell_head, struct element_grow **, double **, int *, int,
 
46
              int, int, double, int);
 
47
int checkHull(int, int, double **, int);
 
48
int ch2d(double **, int);
 
49
int ccw(double **, int, int, int);
 
50
int cmpl(const void *, const void *);
 
51
int cmph(const void *, const void *);
 
52
struct element_grow **structMatrix(long, long, long, long);
 
53
void free_Pvector(double **, long, long);
 
54
void free_structmatrix(struct element_grow **, long, long, long, long);