Table of Contents

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

argIndex int
parentGeom Geometry

GeometryGraph(int, Geometry, IBoundaryNodeRule)

public GeometryGraph(int argIndex, Geometry parentGeom, IBoundaryNodeRule boundaryNodeRule)

Parameters

argIndex int
parentGeom Geometry
boundaryNodeRule IBoundaryNodeRule

Properties

BoundaryNodeRule

Gets the IBoundaryNodeRule used with this geometry graph.

public IBoundaryNodeRule BoundaryNodeRule { get; }

Property Value

IBoundaryNodeRule

BoundaryNodes

public IList<Node> BoundaryNodes { get; }

Property Value

IList<Node>

Geometry

public Geometry Geometry { get; }

Property Value

Geometry

HasTooFewPoints

public bool HasTooFewPoints { get; }

Property Value

bool

InvalidPoint

public Coordinate InvalidPoint { get; }

Property Value

Coordinate

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 Edge

An 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 Coordinate

A Coordinate

ComputeEdgeIntersections(GeometryGraph, LineIntersector, bool)

public SegmentIntersector ComputeEdgeIntersections(GeometryGraph g, LineIntersector li, bool includeProper)

Parameters

g GeometryGraph
li LineIntersector
includeProper bool

Returns

SegmentIntersector

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 LineIntersector

The LineIntersector to use.

computeRingSelfNodes bool

If 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 LineIntersector

The LineIntersector to use

computeRingSelfNodes bool

If false, intersection checks are optimized to not test rings for self-intersection

isDoneIfProperInt bool

Short-circuit the intersection computation if a proper intersection is found

Returns

SegmentIntersector

ComputeSplitEdges(IList<Edge>)

public void ComputeSplitEdges(IList<Edge> edgelist)

Parameters

edgelist IList<Edge>

DetermineBoundary(IBoundaryNodeRule, int)

Determine boundary

public static Location DetermineBoundary(IBoundaryNodeRule boundaryNodeRule, int boundaryCount)

Parameters

boundaryNodeRule IBoundaryNodeRule

The boundary node rule to apply for determination of the boundary

boundaryCount int

The number of component boundaries that a point occurs in.

Returns

Location

Boundary or Interior

FindEdge(LineString)

public Edge FindEdge(LineString line)

Parameters

line LineString

Returns

Edge

GetBoundaryPoints()

public Coordinate[] GetBoundaryPoints()

Returns

Coordinate[]

Locate(Coordinate)

Determines the Location of the given Coordinate in this geometry.

public Location Locate(Coordinate pt)

Parameters

pt Coordinate

The point to test

Returns

Location

The location of the point in the geometry