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.
Since building optimized graphs requires knowing the degree of nodes before creating them, the physical construction of the graph is delayed until a call to generate() is made. No component is created with a call to add(Object), only information about the object is recorded.
@see org.geotools.graph.structure.opt.OptEdge
@see org.geotools.graph.structure.line.OptXYNode
@author Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
@source $URL$
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.