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
argIndex
intparentGeom
GeometryboundaryNodeRule
IBoundaryNodeRule
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
e
EdgeAn
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
pt
CoordinateA
Coordinate
ComputeEdgeIntersections(GeometryGraph, LineIntersector, bool)
public SegmentIntersector ComputeEdgeIntersections(GeometryGraph g, LineIntersector li, bool includeProper)
Parameters
g
GeometryGraphli
LineIntersectorincludeProper
bool
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
li
LineIntersectorThe
LineIntersector
to use.computeRingSelfNodes
boolIf
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
li
LineIntersectorThe
LineIntersector
to usecomputeRingSelfNodes
boolIf
false
, intersection checks are optimized to not test rings for self-intersectionisDoneIfProperInt
boolShort-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
boundaryNodeRule
IBoundaryNodeRuleThe boundary node rule to apply for determination of the boundary
boundaryCount
intThe number of component boundaries that a point occurs in.
Returns
FindEdge(LineString)
public Edge FindEdge(LineString line)
Parameters
line
LineString
Returns
GetBoundaryPoints()
public Coordinate[] GetBoundaryPoints()
Returns
Locate(Coordinate)
Determines the Location of the given Coordinate in this geometry.
public Location Locate(Coordinate pt)
Parameters
pt
CoordinateThe point to test
Returns
- Location
The location of the point in the geometry