View Javadoc
1   /**
2    *
3    */
4   package org.opentrafficsim.road.network.factory.shape;
5   
6   import org.locationtech.jts.geom.Geometry;
7   import org.opentrafficsim.core.network.OTSNode;
8   
9   /**
10   * @author P070518
11   */
12  public abstract class AbstractNWBRoadElement
13  {
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 Geometry;
33       * @param startNode OTSNode;
34       * @param endNode OTSNode;
35       * @param roadId String;
36       * @param beginDistance Double;
37       * @param endDistance Double;
38       */
39      public AbstractNWBRoadElement(Geometry myGeom, OTSNode startNode, OTSNode endNode, String roadId, Double beginDistance,
40              Double endDistance)
41      {
42          super();
43          this.myGeom = myGeom;
44          this.startNode = startNode;
45          this.endNode = endNode;
46          this.roadId = roadId;
47          this.beginDistance = beginDistance;
48          this.endDistance = endDistance;
49      }
50  
51      public Geometry getMyGeom()
52      {
53          return myGeom;
54      }
55  
56      public OTSNode getStartNode()
57      {
58          return startNode;
59      }
60  
61      public OTSNode getEndNode()
62      {
63          return endNode;
64      }
65  
66      public String getRoadId()
67      {
68          return roadId;
69      }
70  
71      public Double getBeginDistance()
72      {
73          return beginDistance;
74      }
75  
76      public Double getEndDistance()
77      {
78          return endDistance;
79      }
80  
81  }