|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vividsolutions.jts.geomgraph.PlanarGraph
public class PlanarGraph
The computation of the IntersectionMatrix
relies on the use of a structure
called a "topology graph". The topology graph contains nodes and edges
corresponding to the nodes and line segments of a Geometry
. Each
node and edge in the graph is labeled with its topological location relative to
the source geometry.
Note that there is no requirement that points of self-intersection be a vertex.
Thus to obtain a correct topology graph, Geometry
s must be
self-noded before constructing their graphs.
Two fundamental operations are supported by topology graphs:
Field Summary | |
---|---|
protected java.util.List |
edgeEndList
|
protected java.util.List |
edges
|
protected NodeMap |
nodes
|
Constructor Summary | |
---|---|
PlanarGraph()
|
|
PlanarGraph(NodeFactory nodeFact)
|
Method Summary | |
---|---|
void |
add(EdgeEnd e)
|
void |
addEdges(java.util.List edgesToAdd)
Add a set of edges to the graph. |
Node |
addNode(Coordinate coord)
|
Node |
addNode(Node node)
|
Node |
find(Coordinate coord)
|
Edge |
findEdge(Coordinate p0,
Coordinate p1)
Returns the edge whose first two coordinates are p0 and p1 |
EdgeEnd |
findEdgeEnd(Edge e)
Returns the EdgeEnd which has edge e as its base edge (MD 18 Feb 2002 - this should return a pair of edges) |
Edge |
findEdgeInSameDirection(Coordinate p0,
Coordinate p1)
Returns the edge which starts at p0 and whose first segment is parallel to p1 |
java.util.Collection |
getEdgeEnds()
|
java.util.Iterator |
getEdgeIterator()
|
java.util.Iterator |
getNodeIterator()
|
java.util.Collection |
getNodes()
|
protected void |
insertEdge(Edge e)
|
boolean |
isBoundaryNode(int geomIndex,
Coordinate coord)
|
void |
linkAllDirectedEdges()
Link the DirectedEdges at the nodes of the graph. |
void |
linkResultDirectedEdges()
Link the DirectedEdges at the nodes of the graph. |
static void |
linkResultDirectedEdges(java.util.Collection nodes)
For nodes in the Collection, link the DirectedEdges at the node that are in the result. |
void |
printEdges(java.io.PrintStream out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List edges
protected NodeMap nodes
protected java.util.List edgeEndList
Constructor Detail |
---|
public PlanarGraph(NodeFactory nodeFact)
public PlanarGraph()
Method Detail |
---|
public static void linkResultDirectedEdges(java.util.Collection nodes)
public java.util.Iterator getEdgeIterator()
public java.util.Collection getEdgeEnds()
public boolean isBoundaryNode(int geomIndex, Coordinate coord)
protected void insertEdge(Edge e)
public void add(EdgeEnd e)
public java.util.Iterator getNodeIterator()
public java.util.Collection getNodes()
public Node addNode(Node node)
public Node addNode(Coordinate coord)
public Node find(Coordinate coord)
public void addEdges(java.util.List edgesToAdd)
public void linkResultDirectedEdges()
public void linkAllDirectedEdges()
public EdgeEnd findEdgeEnd(Edge e)
null
if the edge was not foundpublic Edge findEdge(Coordinate p0, Coordinate p1)
null
if the edge was not foundpublic Edge findEdgeInSameDirection(Coordinate p0, Coordinate p1)
null
if the edge was not foundpublic void printEdges(java.io.PrintStream out)
|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |