Class GeometryGraph
- Namespace
- NetTopologySuite.GeometriesGraph
- Assembly
- NetTopologySuite.dll
A GeometryGraph is a graph that models a given Geometry.
public class GeometryGraph : PlanarGraph
- Inheritance
-
GeometryGraph
- Inherited Members
Constructors
GeometryGraph(int, Geometry)
public GeometryGraph(int argIndex, Geometry parentGeom)
Parameters
GeometryGraph(int, Geometry, IBoundaryNodeRule)
public GeometryGraph(int argIndex, Geometry parentGeom, IBoundaryNodeRule boundaryNodeRule)
Parameters
argIndexintparentGeomGeometryboundaryNodeRuleIBoundaryNodeRule
Properties
BoundaryNodeRule
Gets the IBoundaryNodeRule used with this geometry graph.
public IBoundaryNodeRule BoundaryNodeRule { get; }
Property Value
BoundaryNodes
public IList<Node> BoundaryNodes { get; }
Property Value
Geometry
public Geometry Geometry { get; }
Property Value
HasTooFewPoints
public bool HasTooFewPoints { get; }
Property Value
InvalidPoint
public Coordinate InvalidPoint { get; }
Property Value
Methods
AddEdge(Edge)
Add an Edge computed externally. The label on the Edge is assumed to be correct.
public void AddEdge(Edge e)
Parameters
eEdgeAn
Edge
AddPoint(Coordinate)
Add a point computed externally. The point is assumed to be a Point Geometry part, which has a location of INTERIOR.
public void AddPoint(Coordinate pt)
Parameters
ptCoordinateA
Coordinate
ComputeEdgeIntersections(GeometryGraph, LineIntersector, bool)
public SegmentIntersector ComputeEdgeIntersections(GeometryGraph g, LineIntersector li, bool includeProper)
Parameters
gGeometryGraphliLineIntersectorincludeProperbool
Returns
ComputeSelfNodes(LineIntersector, bool)
Compute self-nodes, taking advantage of the Geometry type to minimize the number of intersection tests. (E.g. rings are not tested for self-intersection, since they are assumed to be valid).
public SegmentIntersector ComputeSelfNodes(LineIntersector li, bool computeRingSelfNodes)
Parameters
liLineIntersectorThe
LineIntersectorto use.computeRingSelfNodesboolIf
false, intersection checks are optimized to not test rings for self-intersection.
Returns
- SegmentIntersector
The computed SegmentIntersector, containing information about the intersections found.
ComputeSelfNodes(LineIntersector, bool, bool)
Compute self-nodes, taking advantage of the Geometry type to minimize the number of intersection tests. (E.g.rings are not tested for self-intersection, since they are assumed to be valid).
[Obsolete("Shrot circuiting no longer allowed")]
public SegmentIntersector ComputeSelfNodes(LineIntersector li, bool computeRingSelfNodes, bool isDoneIfProperInt)
Parameters
liLineIntersectorThe
LineIntersectorto usecomputeRingSelfNodesboolIf
false, intersection checks are optimized to not test rings for self-intersectionisDoneIfProperIntboolShort-circuit the intersection computation if a proper intersection is found
Returns
ComputeSplitEdges(IList<Edge>)
public void ComputeSplitEdges(IList<Edge> edgelist)
Parameters
DetermineBoundary(IBoundaryNodeRule, int)
Determine boundary
public static Location DetermineBoundary(IBoundaryNodeRule boundaryNodeRule, int boundaryCount)
Parameters
boundaryNodeRuleIBoundaryNodeRuleThe boundary node rule to apply for determination of the boundary
boundaryCountintThe number of component boundaries that a point occurs in.
Returns
FindEdge(LineString)
public Edge FindEdge(LineString line)
Parameters
lineLineString
Returns
GetBoundaryPoints()
public Coordinate[] GetBoundaryPoints()
Returns
Locate(Coordinate)
Determines the Location of the given Coordinate in this geometry.
public Location Locate(Coordinate pt)
Parameters
ptCoordinateThe point to test
Returns
- Location
The location of the point in the geometry