forked from tudelft3d/3dfier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
definitions.h
71 lines (61 loc) · 1.66 KB
/
definitions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef __3DFIER__Definitions__
#define __3DFIER__Definitions__
#include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <liblas/liblas.hpp>
#include <ogrsf_frmts.h>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/index/rtree.hpp>
namespace bg = boost::geometry;
namespace bgi = boost::geometry::index;
typedef bg::model::d2::point_xy<double> Point2;
typedef bg::model::segment<Point2> Segment2;
typedef bg::model::linestring<Point2> Linestring2;
typedef bg::model::polygon<Point2, true, false> Polygon2; //-- cw, first!=last
typedef bg::model::ring<Point2, true, false> Ring2; //-- cw, first!=last
typedef bg::model::box<Point2> Box2;
typedef bg::model::point<double, 3, bg::cs::cartesian> Point3;
typedef struct Segment {
int v0;
int v1;
} Segment;
typedef struct Triangle {
int v0;
int v1;
int v2;
} Triangle;
typedef struct PolygonFile {
std::string filename;
std::string idfield;
std::string heightfield;
bool handle_multiple_heights;
std::vector< std::pair<std::string, std::string> > layers;
} PolygonFile;
typedef enum {
BUILDING = 0,
WATER = 1,
BRIDGE = 2,
ROAD = 3,
TERRAIN = 4,
FOREST = 5,
SEPARATION = 6
} TopoClass;
typedef enum {
LAS_UNKNOWN = 0,
LAS_UNCLASSIFIED = 1,
LAS_GROUND = 2,
LAS_BUILDING = 6,
LAS_WATER = 9,
LAS_BRIDGE = 26
} LAS14Class;
#endif