Class NoTrafficLane

    • Constructor Detail

      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             Length lateralOffsetAtStart,
                             Length lateralOffsetAtEnd,
                             Length beginWidth,
                             Length endWidth,
                             boolean fixGradualLateralOffset)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        lateralOffsetAtStart - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the start of the parent Link
        lateralOffsetAtEnd - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the end of the parent Link
        beginWidth - Length; start width, positioned symmetrically around the design line
        endWidth - Length; end width, positioned symmetrically around the design line
        fixGradualLateralOffset - boolean; true if gradualLateralOffset needs to be fixed
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             Length lateralOffsetAtStart,
                             Length lateralOffsetAtEnd,
                             Length beginWidth,
                             Length endWidth)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        lateralOffsetAtStart - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the start of the parent Link
        lateralOffsetAtEnd - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the end of the parent Link
        beginWidth - Length; start width, positioned symmetrically around the design line
        endWidth - Length; end width, positioned symmetrically around the design line
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             Length lateralOffset,
                             Length width)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        lateralOffset - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link
        width - Length; width, positioned symmetrically around the design line
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             List<CrossSectionSlice> crossSectionSlices)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        crossSectionSlices - List<CrossSectionSlice>; The offsets and widths at positions along the line, relative to the design line of the parent link. If there is just one with and offset, there should just be one element in the list with Length = 0. If there are more slices, the last one should be at the length of the design line. If not, a NetworkException is thrown.
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
    • Method Detail

      • getZ

        protected final double getZ()
        Retrieve the Z offset (used to determine what covers what when drawing).
        Overrides:
        getZ in class Lane
        Returns:
        double; the Z-offset for drawing (what's on top, what's underneath).