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  
16      // the geometry
17      private Geometry myGeom;
18  
19      private OTSNode startNode;
20  
21      private OTSNode endNode;
22  
23      // the unique NWB wegvak ID
24      private String roadId;
25  
26      // relative distance at begin of link
27      private Double beginDistance;
28  
29      // relative distance at end of link
30      private Double endDistance;
31  
32      /**
33       * @param myGeom Geometry;
34       * @param startNode OTSNode;
35       * @param endNode OTSNode;
36       * @param roadId String;
37       * @param beginDistance Double;
38       * @param endDistance Double;
39       */
40      public AbstractNWBRoadElement(Geometry myGeom, OTSNode startNode, OTSNode endNode, String roadId, Double beginDistance,
41              Double endDistance)
42      {
43          super();
44          this.myGeom = myGeom;
45          this.startNode = startNode;
46          this.endNode = endNode;
47          this.roadId = roadId;
48          this.beginDistance = beginDistance;
49          this.endDistance = endDistance;
50      }
51  
52      public Geometry getMyGeom()
53      {
54          return myGeom;
55      }
56  
57      public OTSNode getStartNode()
58      {
59          return startNode;
60      }
61  
62      public OTSNode getEndNode()
63      {
64          return endNode;
65      }
66  
67      public String getRoadId()
68      {
69          return roadId;
70      }
71  
72      public Double getBeginDistance()
73      {
74          return beginDistance;
75      }
76  
77      public Double getEndDistance()
78      {
79          return endDistance;
80      }
81  
82  }