DM::GeometricOperations Namespace Reference

provides a set of geometric operations for geometry objects (e.g. intersection, join, differences, etc. ) More...

Functions

PolylineHandle DM_API intersect (const IPolyline &line, const IPolygon &polygon, bool keepPointOrder=false, bool ignorePolygonHeights=false)
 Intersects a polyline with a polygon object (clipping) More...
 
PolylineHandle DM_API intersect (const IPolygon &polygon, const IPolyline &line, bool keepPointOrder=false, bool ignorePolygonHeights=false)
 see above
 
PolylineHandle DM_API intersect (const IPolyline &l, const IWindow &w)
 intersection of polyline with windows (optimised version of a polyline polygon intersection)
 
PolygonHandle DM_API intersect (const IPolygon &polygon1, const IPolygon &polygon2)
 intersection of two polygon objects (polygon1 'and' polygon2) whereas polylines only represents the boundary, polygons represent the full area of closed regions. hence, the intersection of two polygons resulting a polygon containing the overlapping area of the source polygons

 
WindowHandle DM_API intersect (const IWindow &window1, const IWindow &window2)
 intersection of two window objects (window1 'and' window2) if the two windows do not intersect and empty handle is returned
 
PolygonHandle DM_API join (const IPolygon &polygon1, const IPolygon &polygon2)
 join of two polygons (polygon1 'or' polygon2)
 
PolygonHandle DM_API difference (const IPolygon &polygon1, const IPolygon &polygon2)
 difference of two polygons (polygon1 \ polygon2)
 
PolygonHandle DM_API symmetric_difference (const IPolygon &polygon1, const IPolygon &polygon2)
 symmetric difference of two polygons ((polygon1 \ polygon2) 'or' (polygon2 \ polygon1))
 
bool DM_API isIntersecting (const IPoint &pt, const IPolygon &polygon)
 point-in-polygon test
 
bool DM_API isIntersecting (const IPolygon &polygon, const IPoint &pt)
 see above
 

Detailed Description

provides a set of geometric operations for geometry objects (e.g. intersection, join, differences, etc. )

Function Documentation

◆ intersect()

PolylineHandle DM_API DM::GeometricOperations::intersect ( const IPolyline line,
const IPolygon polygon,
bool  keepPointOrder = false,
bool  ignorePolygonHeights = false 
)

Intersects a polyline with a polygon object (clipping)

The intersection process is done in 2D. The heights of new points will be computed from the height information of the corresponding intersecting segments. In case both segments have height information available, the height at the new point will be averaged. This behavior can be changed by enabling or disabling the ignorePolygonHeights flag. If the flag is disabled (=default behavior) height information of polygon vertices will be ignored for height computation of new points. Hence, only the polyline height values will play a roll.

Parameters
[in]linepolyline object to be clipped (object stays unchanged)
[in]polygonpolygon object use for clipping
[in]keepPointOrderFlag if orientation of the resulting line should be preserved (e.g. important for profiles). If the orientation is irrelevant disable the flag to improve processing speed.
[in]ignorePolygonHeightsenabling or disabling heights of polygon vertices for compute new points (see details)
Returns
clipped polyline object