|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.graph.build.line.OptLineGraphGenerator org.geotools.graph.build.line.OptDirectedLineGraphGenerator
An implementation of GraphGenerator used to generate an optimized graph
representing a line network. Graphs are generated by supplying the generator
with objects of type LineSegment via the add(Object) method.
For each line segment added, an edge in the graph is created. The builder
records the end coordinates of each line added, and maintains a map of
coordinates to nodes, creating nodes when neccessary.
Edges created by the generator are of type OptBasicEdge.
Nodes created by the generator are of type OptXYNode.
OptEdge
,
OptXYNode
Constructor Summary | |
OptDirectedLineGraphGenerator()
Constructs a new OptLineGraphGenerator. |
Method Summary | |
Graphable |
add(java.lang.Object obj)
Adds a line to the graph. |
protected Edge |
generateEdge(com.vividsolutions.jts.geom.LineSegment line)
|
protected void |
generateNodes()
|
Edge |
getEdge(com.vividsolutions.jts.geom.Coordinate c1,
com.vividsolutions.jts.geom.Coordinate c2)
|
java.util.Map |
getInNodeMap()
Returns the coordinate to in node map. |
Node |
getNode(com.vividsolutions.jts.geom.Coordinate c)
|
java.util.Map |
getOutNodeMap()
Returns the coordinate to out node map. |
Methods inherited from class org.geotools.graph.build.line.OptLineGraphGenerator |
generate, generateEdges, get, getGraph, getGraphBuilder, getLines, getNodeMap, remove, setGraphBuilder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OptDirectedLineGraphGenerator()
Method Detail |
public Graphable add(java.lang.Object obj)
add
in interface GraphGenerator
add
in class OptLineGraphGenerator
public java.util.Map getInNodeMap()
public java.util.Map getOutNodeMap()
protected void generateNodes()
generateNodes
in class OptLineGraphGenerator
protected Edge generateEdge(com.vividsolutions.jts.geom.LineSegment line)
generateEdge
in class OptLineGraphGenerator
public Node getNode(com.vividsolutions.jts.geom.Coordinate c)
getNode
in interface LineGraphGenerator
getNode
in class OptLineGraphGenerator
public Edge getEdge(com.vividsolutions.jts.geom.Coordinate c1, com.vividsolutions.jts.geom.Coordinate c2)
getEdge
in interface LineGraphGenerator
getEdge
in class OptLineGraphGenerator
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |