C# Класс MapAround.Geometry.PlanarGraph

Represents a graph embedded into 2D plane. Planar graph is used in plenty of spatial operations such as overlay or Clementini operators.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Build ( IGeometry geometry1, IGeometry geometry2 ) : PlanarGraph

Builds a planar graph of two geometries.

BuildFaces ( IList &redundantSegments ) : List

Builds all faces.

BuildPoints ( ) : List

Builds a points from graph nodes.

BuildPolygon ( bool markObject1EdgesOrientation, bool markObject2EdgesOrientation ) : Polygon

Builds a polygon from graph edges.

BuildPolyline ( bool markObject1EdgesOrientation, bool markObject2EdgesOrientation ) : Polyline

Builds a polyline from graph edges.

BuildWithSnap ( IGeometry geometry1, IGeometry geometry2, ICoordinate gridOrigin ) : PlanarGraph

Builds a planar graph of two geometries.

SetElementsEnabledState ( bool enabled ) : void

Sets enabled state to all graph nodes and edges.

Приватные методы

Метод Описание
PlanarGraph ( ) : System

Initializes a new instance of MapAround.Geometry.PlanarGraph

addEdge ( PlanarGraphEdge edge ) : void
addEdges ( ) : void
addOrMergeNode ( ICoordinate coordinate, IGeometry obj ) : void
addSourceSegments ( IGeometry g, int objectNumber ) : void
addSplittedSegment ( SplittedSegment ss ) : void
addVerticesAsNodes ( IGeometry g ) : void
areEqualContours ( Contour c1, Contour c2 ) : bool
build ( ) : void
cutSelfTouch ( Contour contour, int i1, int i2, bool heterogenous ) : Contour
getAngle ( ICoordinate p1, ICoordinate p2, ICoordinate p3, bool counterClockwise ) : double

Gets an angle between p2p1 and p2p3 rays. Angle is measured from p2p1 ray.

getAngleBetweenEdges ( Segment &s1, Segment &s2, bool counterClockwise ) : double

Gets an angle between two segments that share an endpoint.

getContourSelfTouchIndicies ( Contour contour, int &i1, int &i2 ) : bool
getNodeAt ( ICoordinate &point ) : PlanarGraphNode
getRelatedSegments ( Segment segment ) : List
init ( ) : void
internalBuild ( IGeometry geometry1, IGeometry geometry2 ) : void
normalizeContour ( Contour contour, bool heterogenous ) : List
normalizeContours ( List contours ) : void
normalizeSourceSegment ( SourceSegment s ) : void
pointQuadrantNumber ( ICoordinate p ) : int
processContour ( PlanarGraphEdge startEdge, bool backward ) : Contour

Constructs a contour.

processContour ( int startNodeIndex, PlanarGraphNode layout, bool markObject1EdgesOrientation, bool markObject2EdgesOrientation ) : Contour

Constructs a contour.

processLinePath ( int startNodeIndex, bool markObject1EdgesOrientation, bool markObject2EdgesOrientation ) : LinePath
removeSplittedSegment ( SplittedSegment ss ) : void
splitContour ( Contour contour, List contours, List segments ) : void
splitSegmentByNodes ( SourceSegment segment ) : bool
splitSegmentBySegments ( List relatedSegments, SourceSegment currentSegment ) : bool
splitSegments ( ) : void
splitSegmentsByCrossPoints ( List segmentsToSplit, List segmentsCrossPoints, SourceSegment currentSegment ) : void
throwIfNotBuilt ( ) : void
translateAngleQuadrant ( double angle, int quadrantNumber ) : double
updateSplittedSegment ( List relatedSegments, SourceSegment segment ) : bool

Описание методов

Build() публичный статический Метод

Builds a planar graph of two geometries.
public static Build ( IGeometry geometry1, IGeometry geometry2 ) : PlanarGraph
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
Результат PlanarGraph

BuildFaces() публичный Метод

Builds all faces.
public BuildFaces ( IList &redundantSegments ) : List
redundantSegments IList
Результат List

BuildPoints() публичный Метод

Builds a points from graph nodes.
public BuildPoints ( ) : List
Результат List

BuildPolygon() публичный Метод

Builds a polygon from graph edges.
public BuildPolygon ( bool markObject1EdgesOrientation, bool markObject2EdgesOrientation ) : Polygon
markObject1EdgesOrientation bool
markObject2EdgesOrientation bool
Результат Polygon

BuildPolyline() публичный Метод

Builds a polyline from graph edges.
public BuildPolyline ( bool markObject1EdgesOrientation, bool markObject2EdgesOrientation ) : Polyline
markObject1EdgesOrientation bool
markObject2EdgesOrientation bool
Результат Polyline

BuildWithSnap() публичный статический Метод

Builds a planar graph of two geometries.
public static BuildWithSnap ( IGeometry geometry1, IGeometry geometry2, ICoordinate gridOrigin ) : PlanarGraph
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
gridOrigin ICoordinate Snapping grid origin
Результат PlanarGraph

SetElementsEnabledState() публичный Метод

Sets enabled state to all graph nodes and edges.
public SetElementsEnabledState ( bool enabled ) : void
enabled bool Enabled state
Результат void