21 #ifndef EMODNET_QMGC_TIN_CREATION_SIMPLIFICATION_POINT_SET_H 22 #define EMODNET_QMGC_TIN_CREATION_SIMPLIFICATION_POINT_SET_H 24 #include "tin_creator.h" 25 #include "tin_creation_cgal_types.h" 26 #include "cgal/Projection_traits_3_extended.h" 27 #include "cgal/point_set_features_simplification_cost.h" 28 #include "tin_creation_utils.h" 49 typedef PS::Vertex_base_2<ProjTraitsXY> VbXY;
50 typedef CGAL::Constrained_triangulation_face_base_2<ProjTraitsXY> FbXY;
51 typedef CGAL::Triangulation_data_structure_2<VbXY, FbXY> TDSXY;
52 typedef CGAL::Constrained_Delaunay_triangulation_2<ProjTraitsXY,
53 TDSXY, CGAL::Exact_predicates_tag> CDTXY;
65 double borderSimplificationMaxLengthPercent,
66 unsigned int minFeaturePolylineSize)
67 : m_minFeaturePolylineSize(minFeaturePolylineSize)
69 m_borderSimpMaxDistPerZoom = std::vector<FT>{borderSimplificationMaxDistance};
70 m_borderSimpMaxLengthPercentPerZoom = std::vector<FT>{borderSimplificationMaxLengthPercent};
81 const std::vector<double>& borderSimplificationMaxLengthPercent,
82 unsigned int minFeaturePolylineSize)
83 : m_borderSimpMaxDistPerZoom(borderSimplificationMaxDistance)
84 , m_borderSimpMaxLengthPercentPerZoom(borderSimplificationMaxLengthPercent)
89 Polyhedron
create(
const std::vector<Point_3>& dataPts,
90 const bool &constrainEasternVertices,
91 const bool &constrainWesternVertices,
92 const bool &constrainNorthernVertices,
93 const bool &constrainSouthernVertices) ;
103 virtual std::vector<Point_3>
simplify(
const std::vector<Point_3>& pts) = 0;
109 m_borderSimpMaxLengthPercent /= 100.0;
122 double m_borderSimpMaxDist;
123 double m_borderSimpMaxScaledSqDist;
124 double m_borderSimpMaxLengthPercent;
125 std::vector<double> m_borderSimpMaxDistPerZoom;
126 std::vector<double> m_borderSimpMaxLengthPercentPerZoom;
127 unsigned int m_minFeaturePolylineSize;
131 void imposeConstraintsAndSimplifyPolylines(Polyhedron& surface,
132 const bool &constrainEasternVertices,
133 const bool &constrainWesternVertices,
134 const bool &constrainNorthernVertices,
135 const bool &constrainSouthernVertices) ;
139 void getAllNonBorderVertices(
const Polyhedron& poly, PointCloud& nonBorderPts)
const ;
144 #endif //EMODNET_QMGC_TIN_CREATION_SIMPLIFICATION_POINT_SET_H T standardHandlingOfThresholdPerZoom(const std::vector< T > &thresholdsPerZoom, const unsigned int &zoom, const bool &downScale=true)
Definition: tin_creation_utils.h:43
This namespace contains all the types/classes/functions required to create a TIN out of a regularly g...
TinCreationSimplificationPointSet(double borderSimplificationMaxDistance, double borderSimplificationMaxLengthPercent, unsigned int minFeaturePolylineSize)
Definition: tin_creation_simplification_point_set.h:64
void setParamsForZoom(const unsigned int &zoom)
Adapts the parameters of the algorithm for the desired zoom level.
Definition: tin_creation_simplification_point_set.h:105
virtual void setParamsForZoomConcreteStrategy(const unsigned int &zoom)=0
TinCreationSimplificationPointSet(const std::vector< double > &borderSimplificationMaxDistance, const std::vector< double > &borderSimplificationMaxLengthPercent, unsigned int minFeaturePolylineSize)
Definition: tin_creation_simplification_point_set.h:80
Polyhedron create(const std::vector< Point_3 > &dataPts, const bool &constrainEasternVertices, const bool &constrainWesternVertices, const bool &constrainNorthernVertices, const bool &constrainSouthernVertices)
Create a TIN from a set of points.
Definition: tin_creation_simplification_point_set.cpp:33
Polyline simplification cost function used by point set simplification methods.
Definition: point_set_features_simplification_cost.h:43
Creates a TIN using a point set simplification algorithm.
Definition: tin_creation_simplification_point_set.h:45
Defines the interphase of a TIN creation algorithm.
Definition: tin_creator.h:37
Definition: Projection_traits_3_extended.h:145
virtual std::vector< Point_3 > simplify(const std::vector< Point_3 > &pts)=0