Class SubRoadNetwork

    • Constructor Detail

      • SubRoadNetwork

        public SubRoadNetwork()
        Constructor.
      • SubRoadNetwork

        public SubRoadNetwork​(UUID id)
        Constructor.
        Parameters:
        id - the identifier of the network.
        Since:
        4.0
    • Method Detail

      • getUUID

        @Pure
        public UUID getUUID()
        Replies the identifier of the network.
        Returns:
        the identifier.
      • getParentRoadNetwork

        @Pure
        protected final RoadSegmentContainer getParentRoadNetwork()
        Replies the parent road network.
        Returns:
        the parent road network.
      • wrapPoint

        @Pure
        protected RoadConnection wrapPoint​(RoadConnection point,
                                           RoadSegment segment,
                                           boolean isTerminal)
        Description copied from class: SubGraph
        Create a wrapping point for the given graph point.
        Overrides:
        wrapPoint in class SubGraph<RoadSegment,​RoadConnection,​RoadPath>
        Parameters:
        point - the point to wrap.
        segment - is the segment connected to the point.
        isTerminal - indicates if this point should be a terminal point.
        Returns:
        a wrapping point or the point itself.
      • wrapPoint

        @Pure
        protected RoadConnection wrapPoint​(RoadConnection point)
        Wrap the given connection.
        Parameters:
        point - the connection to wrap.
        Returns:
        the wrapper.
        Since:
        16.0
      • unwrap

        @Pure
        protected final <O> O unwrap​(O obj)
        Unwrap a connection.
        Type Parameters:
        O - the type of the object to unwrap.
        Parameters:
        obj - the object to unwrap.
        Returns:
        the unwrapped segment
      • contains

        @Pure
        public boolean contains​(RoadSegment segment)
        Description copied from interface: RoadSegmentContainer
        Replies if the given road segment is inside this road network.
        Specified by:
        contains in interface RoadSegmentContainer
        Parameters:
        segment - a segment.
        Returns:
        true if the segment is inside the road network, otherwise false
      • getRoadSegment

        @Pure
        public RoadSegment getRoadSegment​(GeoId geoId)
        Description copied from interface: RoadSegmentContainer
        Replies the road segment with the given identifier.

        This function is time consuming because the location of the road segment could not be retrieved from the geoId.

        Specified by:
        getRoadSegment in interface RoadSegmentContainer
        Parameters:
        geoId - an identifier.
        Returns:
        the road segment or null if not found.
      • iterator

        @Pure
        public Iterator<? extends RoadSegment> iterator​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds)
        Description copied from interface: RoadSegmentContainer
        Iterates on the segments that intersect the specified bounds.
        Specified by:
        iterator in interface RoadSegmentContainer
        Parameters:
        bounds - is the rectangle inside which the replied elements must be located
        Returns:
        an iterator.
      • iterator

        @Pure
        public Iterator<? extends RoadSegment> iterator​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds,
                                                        int budget)
        Description copied from interface: RoadSegmentContainer
        Iterates on the segments that intersect the specified bounds.
        Specified by:
        iterator in interface RoadSegmentContainer
        Parameters:
        bounds - is the rectangle inside which the replied elements must be located
        budget - is the maximal count of elements which will be replied by the iterator.
        Returns:
        an iterator.
      • toIterable

        @Pure
        public Iterable<? extends RoadSegment> toIterable​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds)
        Description copied from interface: RoadSegmentContainer
        Iterates on the segments that intersect the specified bounds.
        Specified by:
        toIterable in interface RoadSegmentContainer
        Parameters:
        bounds - is the rectangle inside which the replied elements must be located
        Returns:
        an iterator.
      • toIterable

        @Pure
        public Iterable<? extends RoadSegment> toIterable​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds,
                                                          int budget)
        Description copied from interface: RoadSegmentContainer
        Iterates on the segments that intersect the specified bounds.
        Specified by:
        toIterable in interface RoadSegmentContainer
        Parameters:
        bounds - is the rectangle inside which the replied elements must be located
        budget - is the maximal count of elements which will be replied by the iterator.
        Returns:
        an iterator.
      • isLeftSidedTrafficDirection

        @Pure
        public boolean isLeftSidedTrafficDirection()
        Description copied from interface: RoadSegmentContainer
        Replies if this road network uses a left-side circulation direction rule.

        When left-side circulation direction rule is used, it is supposed that all vehicles are going on the left side of the roads. For example, this rule is used in UK.

        Specified by:
        isLeftSidedTrafficDirection in interface RoadSegmentContainer
        Returns:
        true if the left-side rule is used on this network, otherwise false.
      • isRightSidedTrafficDirection

        @Pure
        public boolean isRightSidedTrafficDirection()
        Description copied from interface: RoadSegmentContainer
        Replies if this road network uses a right-side circulation direction rule.

        When right-side circulation direction rule is used, it is supposed that all vehicles are going on the right side of the roads. For example, this rule is used in France.

        Specified by:
        isRightSidedTrafficDirection in interface RoadSegmentContainer
        Returns:
        true if the right-side rule is used on this network, otherwise false.