Package org.locationtech.jts.geomgraph
Class GeometryGraph
java.lang.Object
org.locationtech.jts.geomgraph.PlanarGraph
org.locationtech.jts.geomgraph.GeometryGraph
A GeometryGraph is a graph that models a given Geometry
- Version:
- 1.7
-
Field Summary
Fields inherited from class org.locationtech.jts.geomgraph.PlanarGraph
edgeEndList, edges, nodes
-
Constructor Summary
ConstructorsConstructorDescriptionGeometryGraph
(int argIndex, Geometry parentGeom) GeometryGraph
(int argIndex, Geometry parentGeom, BoundaryNodeRule boundaryNodeRule) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an Edge computed externally.void
addPoint
(Coordinate pt) Add a point computed externally.computeEdgeIntersections
(GeometryGraph g, LineIntersector li, boolean includeProper) computeSelfNodes
(LineIntersector li, boolean computeRingSelfNodes) Compute self-nodes, taking advantage of the Geometry type to minimize the number of intersection tests.void
computeSplitEdges
(List edgelist) static int
determineBoundary
(BoundaryNodeRule boundaryNodeRule, int boundaryCount) Determine boundaryfindEdge
(LineString line) boolean
int
locate
(Coordinate pt) Determines theLocation
of the givenCoordinate
in this geometry.Methods inherited from class org.locationtech.jts.geomgraph.PlanarGraph
add, addEdges, addNode, addNode, find, findEdge, findEdgeEnd, findEdgeInSameDirection, getEdgeEnds, getEdgeIterator, getNodeIterator, getNodes, insertEdge, isBoundaryNode, linkAllDirectedEdges, linkResultDirectedEdges, linkResultDirectedEdges, printEdges
-
Constructor Details
-
GeometryGraph
-
GeometryGraph
-
-
Method Details
-
determineBoundary
Determine boundary- Parameters:
boundaryNodeRule
- Boundary node ruleboundaryCount
- the number of component boundaries that this point occurs in- Returns:
- boundary or interior
-
hasTooFewPoints
public boolean hasTooFewPoints() -
getInvalidPoint
-
getGeometry
-
getBoundaryNodeRule
-
getBoundaryNodes
-
getBoundaryPoints
-
findEdge
-
computeSplitEdges
-
addEdge
Add an Edge computed externally. The label on the Edge is assumed to be correct.- Parameters:
e
- Edge
-
addPoint
Add a point computed externally. The point is assumed to be a Point Geometry part, which has a location of INTERIOR.- Parameters:
pt
- Coordinate
-
computeSelfNodes
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
- the LineIntersector to usecomputeRingSelfNodes
- iffalse
, intersection checks are optimized to not test rings for self-intersection- Returns:
- the computed SegmentIntersector containing information about the intersections found
-
computeEdgeIntersections
public SegmentIntersector computeEdgeIntersections(GeometryGraph g, LineIntersector li, boolean includeProper) -
locate
Determines theLocation
of the givenCoordinate
in this geometry.- Parameters:
pt
- the point to test- Returns:
- the location of the point in the geometry
-