View Javadoc
1   /**
2    *
3    */
4   package org.opentrafficsim.road.network.factory.shape;
5   
6   import org.opentrafficsim.core.network.OTSNode;
7   
8   import com.vividsolutions.jts.geom.Geometry;
9   
10  /**
11   * @author P070518
12   */
13  public abstract class AbstractNWBRoadElement {
14  
15      // the geometry
16      private Geometry myGeom;
17  
18      private OTSNode startNode;
19  
20      private OTSNode endNode;
21  
22      // the unique NWB wegvak ID
23      private String roadId;
24  
25      // relative distance at begin of link
26      private Double beginDistance;
27  
28      // relative distance at end of link
29      private Double endDistance;
30  
31      /**
32       * @param myGeom
33       * @param startNode
34       * @param endNode
35       * @param roadId
36       * @param beginDistance
37       * @param endDistance
38       */
39      public AbstractNWBRoadElement(Geometry myGeom, OTSNode startNode, OTSNode endNode, String roadId, Double beginDistance,
40          Double endDistance) {
41          super();
42          this.myGeom = myGeom;
43          this.startNode = startNode;
44          this.endNode = endNode;
45          this.roadId = roadId;
46          this.beginDistance = beginDistance;
47          this.endDistance = endDistance;
48      }
49  
50      public Geometry getMyGeom() {
51          return myGeom;
52      }
53  
54      public OTSNode getStartNode() {
55          return startNode;
56      }
57  
58      public OTSNode getEndNode() {
59          return endNode;
60      }
61  
62      public String getRoadId() {
63          return roadId;
64      }
65  
66      public Double getBeginDistance() {
67          return beginDistance;
68      }
69  
70      public Double getEndDistance() {
71          return endDistance;
72      }
73  
74  }