AbstractNWBRoadElement.java

  1. /**
  2.  *
  3.  */
  4. package org.opentrafficsim.road.network.factory.shape;

  5. import org.locationtech.jts.geom.Geometry;
  6. import org.opentrafficsim.core.network.OTSNode;

  7. /**
  8.  * @author P070518
  9.  */
  10. public abstract class AbstractNWBRoadElement
  11. {

  12.     // the geometry
  13.     private Geometry myGeom;

  14.     private OTSNode startNode;

  15.     private OTSNode endNode;

  16.     // the unique NWB wegvak ID
  17.     private String roadId;

  18.     // relative distance at begin of link
  19.     private Double beginDistance;

  20.     // relative distance at end of link
  21.     private Double endDistance;

  22.     /**
  23.      * @param myGeom Geometry;
  24.      * @param startNode OTSNode;
  25.      * @param endNode OTSNode;
  26.      * @param roadId String;
  27.      * @param beginDistance Double;
  28.      * @param endDistance Double;
  29.      */
  30.     public AbstractNWBRoadElement(Geometry myGeom, OTSNode startNode, OTSNode endNode, String roadId, Double beginDistance,
  31.             Double endDistance)
  32.     {
  33.         super();
  34.         this.myGeom = myGeom;
  35.         this.startNode = startNode;
  36.         this.endNode = endNode;
  37.         this.roadId = roadId;
  38.         this.beginDistance = beginDistance;
  39.         this.endDistance = endDistance;
  40.     }

  41.     public Geometry getMyGeom()
  42.     {
  43.         return myGeom;
  44.     }

  45.     public OTSNode getStartNode()
  46.     {
  47.         return startNode;
  48.     }

  49.     public OTSNode getEndNode()
  50.     {
  51.         return endNode;
  52.     }

  53.     public String getRoadId()
  54.     {
  55.         return roadId;
  56.     }

  57.     public Double getBeginDistance()
  58.     {
  59.         return beginDistance;
  60.     }

  61.     public Double getEndDistance()
  62.     {
  63.         return endDistance;
  64.     }

  65. }