Class GeometryGraph

Hierarchy: Object , PlanarGraph, GeometryGraph
public class GeometryGraph
extends PlanarGraph
A GeometryGraph is a graph that models a given Geometry

Other

  • version: 1.7
public GeometryGraph(int argIndex, Geometry parentGeom)
public GeometryGraph(int argIndex, Geometry parentGeom, BoundaryNodeRule boundaryNodeRule)
public static int determineBoundary(BoundaryNodeRule boundaryNodeRule, int boundaryCount)
This method implements the Boundary Determination Rule for determining whether a component (node or edge) that appears multiple times in elements of a MultiGeometry is in the boundary or the interior of the Geometry
The SFS uses the "Mod-2 Rule", which this function implements
An alternative (and possibly more intuitive) rule would be the "At Most One Rule": isInBoundary = (componentCount == 1)
public boolean hasTooFewPoints()
This constructor is used by clients that wish to add Edges explicitly, rather than adding a Geometry. (An example is BufferOp).
public Coordinate getInvalidPoint()
public Geometry getGeometry()
public BoundaryNodeRule getBoundaryNodeRule()
public Collection getBoundaryNodes()
public Coordinate[] getBoundaryPoints()
public Edge findEdge(LineString line)
public void computeSplitEdges(List edgelist)
public void addEdge(Edge e)
Add an Edge computed externally. The label on the Edge is assumed to be correct.
public void addPoint(Coordinate pt)
Add a point computed externally. The point is assumed to be a Point Geometry part, which has a location of INTERIOR.
public SegmentIntersector computeSelfNodes(LineIntersector li, boolean computeRingSelfNodes)
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).
Parameters:
li - li the LineIntersector to use
computeRingSelfNodes - computeRingSelfNodes if false, intersection checks are optimized to not test rings for self-intersection
Returns:
the computed SegmentIntersector containing information about the intersections found
public SegmentIntersector computeSelfNodes(LineIntersector li, boolean computeRingSelfNodes, boolean isDoneIfProperInt)
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).
Parameters:
li - li the LineIntersector to use
computeRingSelfNodes - computeRingSelfNodes if false, intersection checks are optimized to not test rings for self-intersection
isDoneIfProperInt - isDoneIfProperInt short-circuit the intersection computation if a proper intersection is found
Returns:
the computed SegmentIntersector containing information about the intersections found
public SegmentIntersector computeEdgeIntersections(GeometryGraph g, LineIntersector li, boolean includeProper)
public int locate(Coordinate pt)
Determines the Location of the given Coordinate in this geometry.
Parameters:
pt - pt the point to test
Returns:
the location of the point in the geometry