GeometricAlgorithms Class Reference

provides a set of geometric algorithms (Douglas-Peucker algorithm, densification of lines) More...

+ Inheritance diagram for GeometricAlgorithms:

Static Public Member Functions

def analyseDistance (base, other, callback, maxDist=-1.0, d3=True)
 possible calls: More...
 
def densify (line, maxSpacing)
 densify a polyline by inserting new points along the line segments
More...
 
def getBoundingBox (geo)
 Get the 3D bounding box of a geometry object. More...
 
def getBoundingWindow (geo)
 Get the 2D bounding window of a geometry object. More...
 
def thinOut (line, maxOrthoDist)
 Use the Douglas-Peucker algorithm to create a polyline with a subset of vertices of the provided line object. More...
 

Detailed Description

provides a set of geometric algorithms (Douglas-Peucker algorithm, densification of lines)

Member Function Documentation

◆ analyseDistance()

def analyseDistance (   base,
  other,
  callback,
  maxDist = -1.0,
  d3 = True 
)
static

possible calls:

  • analyseDistance(base: Polyline, other: Polyline, callback: AnalyseDistance, maxDist: object, d3: object)
  • analyseDistance(line: Polyline, pt: Point, callback: AnalyseDistance, maxDist: object, d3: object)
Parameters
base(type: Polyline) mandatory parameter
other(type: Point | Polyline) mandatory parameter
callback(type: AnalyseDistance) mandatory parameter
maxDist(type: object) optional parameter
d3(type: object) optional parameter

◆ densify()

def densify (   line,
  maxSpacing 
)
static

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

Parameters
[in]linepolyline that should be densified
[in]maxSpacingmaximum spacing between neighboring vertices
Returns
resulting object

◆ getBoundingBox()

def getBoundingBox (   geo)
static

Get the 3D bounding box of a geometry object.

◆ getBoundingWindow()

def getBoundingWindow (   geo)
static

Get the 2D bounding window of a geometry object.

◆ thinOut()

def thinOut (   line,
  maxOrthoDist 
)
static

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

Parameters
[in]linepolyline that should be thinned out
[in]maxOrthoDistDiscarded vertices feature an orthogonal distance to the returned polyline <= d_maxOrthoDist
Returns
resulting object