| java.lang.Object org.geotools.graph.build.line.BasicLineGraphGenerator
All known Subclasses: org.geotools.graph.build.line.BasicDirectedLineGraphGenerator, org.geotools.graph.build.line.LineStringGraphGenerator,
BasicLineGraphGenerator | public class BasicLineGraphGenerator implements LineGraphGenerator(Code) | | 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.
See Also: org.geotools.graph.structure.line.BasicXYNode See Also: org.geotools.graph.structure.basic.BasicEdge See Also: com.vividsolutions.jts.geom.LineSegment See Also: com.vividsolutions.jts.geom.Coordinate author: Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net |
BasicLineGraphGenerator | public BasicLineGraphGenerator()(Code) | | Constructs a new BasicLineGraphGenerator.
|
get | public Graphable get(Object obj)(Code) | | Returns the edge which represents a line. Note that if the exact same line
has been added to the graph multiple times, then only one of the edges that
represents it will be returned. It is undefined which edge will be returned.
Parameters: obj - An instance of LineSegment. Edge that represents the line. See Also: GraphGenerator.get(Object) |
getEdge | public Edge getEdge(Coordinate c1, Coordinate c2)(Code) | | |
getNodeMap | public Map getNodeMap()(Code) | | Returns the coordinate to node map used to build nodes representing line
endpoint coordinates.
coordinate to ndoe map. |
|
|