C# Class MapAround.Geometry.OverlayCalculator

Overlay calculator. Instances of this class are used to calculate the results of Boolean operations (union, intersection, difference, symmetric difference) over the point sets. Point sets can be defined as a polygons, polylines or points.
ファイルを表示 Open project: gkrsu/maparound.core Class Usage Examples

Public Methods

Method Description
CalculateOverlay ( IGeometry geometry1, IGeometry geometry2, OverlayType operation ) : GeometryCollection

Calculates an overlay of two geometries.

Difference ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection

Calculates a difference of two geometries.

Intersection ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection

Calculates an intersection of two geometries.

SimplifyContours ( IList contours ) : List

Computes the contours of the topologically normalized polygon.

Contours that are not intersected. Orientations are set clockwise for holes and counter clockwise for shells. Sections of the boundary repeated an even number of times will be removed.

SimplifyLinePaths ( IList paths ) : List

Computes a list of line paths of the topologically normalized polyline.

These line paths do not contain intersections. Allowed only the mutual and self-touches at the start and end points.

SymmetricDifference ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection

Calculates a symmetric difference of two geometries.

Union ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection

Calculates a union of two geometries.

Private Methods

Method Description
addPoints ( PlanarGraph graph, OverlayType operation, Polygon p1, Polygon p2, Collection collection ) : void
addPolygon ( PlanarGraph graph, OverlayType operation, Polygon p1, Polygon p2, Collection collection ) : void
addPolyline ( PlanarGraph graph, OverlayType operation, Polygon p1, Polygon p2, Collection collection ) : void
calculateNonIntersectedObjectsOverlay ( IGeometry geometry1, IGeometry geometry2, OverlayType operation, bool performSnapping ) : GeometryCollection
calculateOverlay ( IGeometry geometry1, IGeometry geometry2, OverlayType operation, bool performSnapping ) : GeometryCollection
getPointPointOverlay ( MultiPoint mp1, MultiPoint mp2, OverlayType operation, ICollection result ) : void
getPointPolygonOverlay ( MultiPoint mp, Polygon polygon, OverlayType operation, GeometryCollection result, bool performSnapping, bool inverseArgs ) : void
getPointPolylineOverlay ( MultiPoint mp, Polyline polyline, OverlayType operation, GeometryCollection result, bool performSnapping, bool inverseArgs ) : void
getPolygonPolygonOverlay ( Polygon polygon1, Polygon polygon2, OverlayType operation, GeometryCollection result, bool performSnapping ) : void
getPolylinePolygonOverlay ( Polyline polyline, Polygon polygon, OverlayType operation, GeometryCollection result, bool performSnapping, bool inverseArgs ) : void
getPolylinePolylineOverlay ( Polyline polyline1, Polyline polyline2, OverlayType operation, GeometryCollection result, bool performSnapping ) : void
init ( bool performSnapping ) : void
isAreaEdgeEnabled ( PlanarGraphEdge edge, OverlayType operation, Polygon p1, Polygon p2 ) : bool
isAreaEdgeEnabled ( PlanarGraphEdge edge, OverlayType operation, Polygon polygon, bool inverseArgs ) : bool
isLinearEdgeEnabled ( PlanarGraphEdge edge, OverlayType operation, Polygon p1, Polygon p2 ) : bool
isLinearEdgeEnabled ( PlanarGraphEdge edge, OverlayType operation, Polygon polygon, bool inverseArgs ) : bool
isNodeEnabled ( PlanarGraphNode node, OverlayType operation, Polygon p1, Polygon p2 ) : bool
isNodeEnabled ( PlanarGraphNode node, OverlayType operation, Polyline polyline, Polygon polygon, bool inverseArgs ) : bool
reduceGeometrySegments ( IGeometry g, double minLength ) : void
simplifyContours ( IList contours, bool performSnapping ) : List
simplifyLinePaths ( IList paths, bool performSnapping ) : List
snapGeometryPoints ( IGeometry g ) : IGeometry
translateGeometry ( IGeometry geometry, double x, double y ) : IGeometry

Method Details

CalculateOverlay() public method

Calculates an overlay of two geometries.
public CalculateOverlay ( IGeometry geometry1, IGeometry geometry2, OverlayType operation ) : GeometryCollection
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
operation OverlayType Overlay type
return GeometryCollection

Difference() public method

Calculates a difference of two geometries.
public Difference ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
return GeometryCollection

Intersection() public method

Calculates an intersection of two geometries.
public Intersection ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
return GeometryCollection

SimplifyContours() public method

Computes the contours of the topologically normalized polygon.
Contours that are not intersected. Orientations are set clockwise for holes and counter clockwise for shells. Sections of the boundary repeated an even number of times will be removed.
public SimplifyContours ( IList contours ) : List
contours IList A list containing initial contours
return List

SimplifyLinePaths() public method

Computes a list of line paths of the topologically normalized polyline. These line paths do not contain intersections. Allowed only the mutual and self-touches at the start and end points.
public SimplifyLinePaths ( IList paths ) : List
paths IList A list containing initial line paths
return List

SymmetricDifference() public method

Calculates a symmetric difference of two geometries.
public SymmetricDifference ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
return GeometryCollection

Union() public method

Calculates a union of two geometries.
public Union ( IGeometry geometry1, IGeometry geometry2 ) : GeometryCollection
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
return GeometryCollection