EMODnet Quantized Mesh Generator for Cesium
Public Member Functions | List of all members
TinCreation::TinCreationSimplificationPointSet Class Referenceabstract

Creates a TIN using a point set simplification algorithm. More...

#include <tin_creation_simplification_point_set.h>

Inheritance diagram for TinCreation::TinCreationSimplificationPointSet:
TinCreation::TinCreationStrategy TinCreation::TinCreationSimplificationPointSetGrid TinCreation::TinCreationSimplificationPointSetHierarchy TinCreation::TinCreationSimplificationPointSetRandom TinCreation::TinCreationSimplificationPointSetWLOP

Public Member Functions

 TinCreationSimplificationPointSet (double borderSimplificationMaxDistance, double borderSimplificationMaxLengthPercent, unsigned int minFeaturePolylineSize)
 
 TinCreationSimplificationPointSet (const std::vector< double > &borderSimplificationMaxDistance, const std::vector< double > &borderSimplificationMaxLengthPercent, unsigned int minFeaturePolylineSize)
 
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. More...
 
virtual std::vector< Point_3 > simplify (const std::vector< Point_3 > &pts)=0
 
void setParamsForZoom (const unsigned int &zoom)
 Adapts the parameters of the algorithm for the desired zoom level. More...
 
virtual void setParamsForZoomConcreteStrategy (const unsigned int &zoom)=0
 
- Public Member Functions inherited from TinCreation::TinCreationStrategy
 TinCreationStrategy ()
 Constructor.
 
void setScaleZ (const double &scale)
 
double getScaleZ ()
 Get the scale in Z.
 
void setBounds (const double &minX, const double &minY, const double &minZ, const double &maxX, const double &maxY, const double &maxZ)
 
double getMinX () const
 Get the minimum X coordinate.
 
double getMinY () const
 Get the minimum Y coordinate.
 
double getMinZ () const
 Get the minimum Z coordinate.
 
double getMaxX () const
 Get the maximum X coordinate.
 
double getMaxY () const
 Get the maximum Y coordinate.
 
double getMaxZ () const
 Get the maximum Z coordinate.
 
bool hasOriginalBoundingBox () const
 
std::vector< Point_3 > convertUVHToECEF (const std::vector< Point_3 > &pts) const
 Convert points to ECEF assuming that they are on a UVH format, and given the limits of the tile.
 
std::vector< Point_3 > convertECEFToUVH (const std::vector< Point_3 > &pts) const
 Convert points from local UVH to ECEF given the limits of the tile.
 
Point_3 convertUVHToECEF (const Point_3 &p) const
 Convert points to ECEF assuming that they are on a UVH format, and given the limits of the tile.
 
Point_3 convertECEFToUVH (const Point_3 &p) const
 Convert points from local UVH to ECEF given the limits of the tile.
 

Detailed Description

Creates a TIN using a point set simplification algorithm.

This is an interphase class for point set simplification methods. In this class, the main processing required to use point set simplification techniques in square tiles is defined, but the actual point set simplification method is defined in child classes, one for each method.

Thus, this class is responsible of running the common part of these methods, which is basically to detect border and feature edges in the original data, create polylines from those, and simplify them separately. Once the polylines have been simplified, the rest of point sets are simplified (using the method implemented in each child class) and triangulated in the XY plane.

Constructor & Destructor Documentation

◆ TinCreationSimplificationPointSet() [1/2]

TinCreation::TinCreationSimplificationPointSet::TinCreationSimplificationPointSet ( double  borderSimplificationMaxDistance,
double  borderSimplificationMaxLengthPercent,
unsigned int  minFeaturePolylineSize 
)
inline

Constructor

Parameters
borderSimplificationMaxDistanceMaximum error for polyline simplification
borderSimplificationMaxLengthPercentMaximum length for an edge in the simplified polyline. This prevents oversimplification in planar tiles.
minFeaturePolylineSizeMinimum number of connected edges in a sharp feature polyline to consider it during processing

◆ TinCreationSimplificationPointSet() [2/2]

TinCreation::TinCreationSimplificationPointSet::TinCreationSimplificationPointSet ( const std::vector< double > &  borderSimplificationMaxDistance,
const std::vector< double > &  borderSimplificationMaxLengthPercent,
unsigned int  minFeaturePolylineSize 
)
inline

Constructor

Parameters
borderSimplificationMaxDistanceMaximum error for polyline simplification per zoom
borderSimplificationMaxLengthPercentMaximum length for an edge in the simplified polyline per zoom. This prevents oversimplification in planar tiles.
minFeaturePolylineSizeMinimum number of connected edges in a sharp feature polyline to consider it during processing

Member Function Documentation

◆ create()

Polyhedron TinCreation::TinCreationSimplificationPointSet::create ( const std::vector< Point_3 > &  dataPts,
const bool &  constrainEasternVertices,
const bool &  constrainWesternVertices,
const bool &  constrainNorthernVertices,
const bool &  constrainSouthernVertices 
)
virtual

Create a TIN from a set of points.

While it does not impose any regularity on the input points, the use of constrain<X>Vertices is restricted to the shape of the convex hull of the input point being an axis-aligned rectangle.

Parameters
dataPtsInput 3D point set
constrainEasternVerticesFlag indicating whether the vertices on the eastern border of the tile should be preserved or not
constrainWesternVerticesFlag indicating whether the vertices on the western border of the tile should be preserved or not
constrainNorthernVerticesFlag indicating whether the vertices on the northern border of the tile should be preserved or not
constrainSouthernVerticesFlag indicating whether the vertices on the southern border of the tile should be preserved or not
Returns

Implements TinCreation::TinCreationStrategy.

◆ setParamsForZoom()

void TinCreation::TinCreationSimplificationPointSet::setParamsForZoom ( const unsigned int &  zoom)
inlinevirtual

Adapts the parameters of the algorithm for the desired zoom level.

For further information, see the parameters' setting mechanism in the tutorial.

Parameters
zoomCurrent zoom level

Implements TinCreation::TinCreationStrategy.

◆ setParamsForZoomConcreteStrategy()

virtual void TinCreation::TinCreationSimplificationPointSet::setParamsForZoomConcreteStrategy ( const unsigned int &  zoom)
pure virtual

◆ simplify()

virtual std::vector<Point_3> TinCreation::TinCreationSimplificationPointSet::simplify ( const std::vector< Point_3 > &  pts)
pure virtual

The documentation for this class was generated from the following files: