|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.graph.build.line.BasicLineGraphGenerator
An implementation of GraphGenerator used to generate a 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 BasicEdge and contain an object
of type LineSegment.
Nodes created by the generator are of type BasicXYNode and contain an object
of type Coordinate.
BasicXYNode,
BasicEdge,
LineSegment,
Coordinate| Constructor Summary | |
BasicLineGraphGenerator()
Constructs a new BasicLineGraphGenerator. |
|
| Method Summary | |
Graphable |
add(java.lang.Object obj)
Adds a line to the graph. |
Graphable |
get(java.lang.Object obj)
Returns the edge which represents a line. |
Edge |
getEdge(com.vividsolutions.jts.geom.Coordinate c1,
com.vividsolutions.jts.geom.Coordinate c2)
|
Graph |
getGraph()
Returns the graph being generated. |
GraphBuilder |
getGraphBuilder()
Returns the underlying builder. |
Node |
getNode(com.vividsolutions.jts.geom.Coordinate c)
|
java.util.Map |
getNodeMap()
Returns the coordinate to node map used to build nodes representing line endpoint coordinates. |
Graphable |
remove(java.lang.Object obj)
Removes the edge from the graph that represents a line. |
void |
setGraphBuilder(GraphBuilder builder)
Sets the underlying builder used to physically construct the graph. |
protected void |
setObject(Edge e,
java.lang.Object obj)
|
protected void |
setObject(Node n,
java.lang.Object obj)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicLineGraphGenerator()
| Method Detail |
public Graphable add(java.lang.Object obj)
add in interface GraphGeneratorobj - An instance of LineSegment.
LineSegment,
GraphGenerator.add(Object)public Graphable get(java.lang.Object obj)
get in interface GraphGeneratorobj - An instance of LineSegment.
GraphGenerator.get(Object)public Graphable remove(java.lang.Object obj)
remove in interface GraphGeneratorobj - The object modelled by the component.
GraphGenerator.remove(Object)public void setGraphBuilder(GraphBuilder builder)
GraphGenerator
setGraphBuilder in interface GraphGeneratorbuilder - The new underlying GraphBuilder.GraphGenerator.setGraphBuilder(GraphBuilder)public GraphBuilder getGraphBuilder()
GraphGenerator
getGraphBuilder in interface GraphGeneratorGraphGenerator.getGraphBuilder()public Graph getGraph()
GraphGenerator
getGraph in interface GraphGeneratorGraphGenerator.getGraph()public java.util.Map getNodeMap()
public Node getNode(com.vividsolutions.jts.geom.Coordinate c)
getNode in interface LineGraphGenerator
public Edge getEdge(com.vividsolutions.jts.geom.Coordinate c1,
com.vividsolutions.jts.geom.Coordinate c2)
getEdge in interface LineGraphGenerator
protected void setObject(Edge e,
java.lang.Object obj)
protected void setObject(Node n,
java.lang.Object obj)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||