01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2002, Refractions Reserach Inc.
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.graph.build.line;
18:
19: import org.geotools.graph.build.basic.BasicDirectedGraphBuilder;
20:
21: /**
22: * An implementation of GraphGenerator used to generate a graph representing a
23: * directed line network. Graphs are generated by supplying the generator with
24: * objects of type LineSegment via the add(Object) method. <BR>
25: * <BR>
26: * For each line segment added, an edge in the graph is created. The builder
27: * records the end coordinates of each line added, and maintains a map of
28: * coordinates to nodes, creating nodes when neccessary.<BR>
29: * <BR>
30: * Edges created by the generator are of type BasicDirectedEdge and contain an
31: * object of type LineSegment.<BR>
32: * Nodes created by the generator are of type BasicDirectedXYNode and contain
33: * an object of type Coordinate.
34: *
35: * @see org.geotools.graph.structure.basic.BasicDirectedXYNode
36: * @see org.geotools.graph.structure.basic.BasicDirectedEdge
37: * @see com.vividsolutions.jts.geom.LineSegment
38: * @see com.vividsolutions.jts.geom.Coordinate
39: *
40: * @author Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
41: *
42: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/extension/graph/src/main/java/org/geotools/graph/build/line/BasicDirectedLineGraphGenerator.java $
43: */
44: public class BasicDirectedLineGraphGenerator extends
45: BasicLineGraphGenerator {
46:
47: /**
48: * Constructs a new BasicDirectedLineGraphGenerator.
49: */
50: public BasicDirectedLineGraphGenerator() {
51: super ();
52: setGraphBuilder(new BasicDirectedGraphBuilder());
53: }
54: }
|