provides a set of geometric algorithms (Douglas-Peucker algorithm, densification of lines) More...
Functions | |
DM_API DM::PolylineHandle | thinOut (const DM::PolylineHandle &line, double maxOrthoDist) |
Use the Douglas-Peucker algorithm to create a polyline with a subset of vertices of the provided line object. More... | |
DM_API DM::PolylineHandle | densify (const DM::PolylineHandle &line, double maxSpacing) |
densify a polyline by inserting new points along the line segments More... | |
DM_API bool | isSelfIntersecting (const DM::PolylineHandle &line) |
test if a polyline is self intersecting | |
DM_API void | analyseDistance (const PolylineHandle &base, const PolylineHandle &other, IAnalyseDistance &callback, double maxDist=-1, bool d3=true) |
For analysing 2d/3d distances between vertices of the base polyline to the other provided polyline (optional a max distance threshold is considered) More... | |
DM_API DM::WindowHandle | getBoundingWindow (const IGeometry &geo) |
Get the 2D bounding window of a geometry object. | |
DM_API DM::BoxHandle | getBoundingBox (const IGeometry &geo) |
Get the 3D bounding box of a geometry object. | |
provides a set of geometric algorithms (Douglas-Peucker algorithm, densification of lines)
DM_API void DM::GeometricAlgorithms::analyseDistance | ( | const PolylineHandle & | base, |
const PolylineHandle & | other, | ||
IAnalyseDistance & | callback, | ||
double | maxDist = -1 , |
||
bool | d3 = true |
||
) |
For analysing 2d/3d distances between vertices of the base polyline to the other provided polyline (optional a max distance threshold is considered)
The function computes the shortest 2d/3d distances of all vertices of the base polyline to the 'other' polyline. With the results of each base vertex distance computation the corresponding function of the provided callback object is called. If an maximum distance threshold is provided (maxDist>0), the algorithms only considers distances up to the given threshold (see IAnalyseDistance). The implemented algorithm uses the maxDist threshold during spatial search and therfore, is more efficient than only handling the distance threshold within the callback oject.
[in] | base | the vertex of the base polyline is used for distance analysis |
[in] | other | polyline to which the distances are computed |
[in] | callback | callback object for analysing the computed distance results |
[in] | maxDist | optional maximum distance threshold (-1: no distance threshold is applied) |
[in] | d3 | flag if 3d or 2d computation (true: 3d / false: 2d) |
DM_API DM::PolylineHandle DM::GeometricAlgorithms::densify | ( | const DM::PolylineHandle & | line, |
double | maxSpacing | ||
) |
densify a polyline by inserting new points along the line segments
insert as few points as possible to reach the criterion:
(distances between neighbours) <= d_maxSpacing
distribute the new points equally along each line segment
preserve original points together with their additional infos
[in] | line | polyline that should be densified |
[in] | maxSpacing | maximum spacing between neighboring vertices |
DM_API DM::PolylineHandle DM::GeometricAlgorithms::thinOut | ( | const DM::PolylineHandle & | line, |
double | maxOrthoDist | ||
) |
Use the Douglas-Peucker algorithm to create a polyline with a subset of vertices of the provided line object.
Each polyline part is treated as a separate object
[in] | line | polyline that should be thinned out |
[in] | maxOrthoDist | Discarded vertices feature an orthogonal distance to the returned polyline <= d_maxOrthoDist |