Interface RoadSegmentContainer

    • Method Detail

      • isLeftSidedTrafficDirection

        @Pure
        boolean isLeftSidedTrafficDirection()
        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.

        Returns:
        true if the left-side rule is used on this network, otherwise false.
      • isRightSidedTrafficDirection

        @Pure
        boolean isRightSidedTrafficDirection()
        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.

        Returns:
        true if the right-side rule is used on this network, otherwise false.
      • contains

        @Pure
        boolean contains​(RoadSegment segment)
        Replies if the given road segment is inside this road network.
        Parameters:
        segment - a segment.
        Returns:
        true if the segment is inside the road network, otherwise false
      • getRoadSegment

        @Pure
        RoadSegment getRoadSegment​(GeoId geoId)
        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.

        Parameters:
        geoId - an identifier.
        Returns:
        the road segment or null if not found.
      • getRoadSegment

        @Pure
        RoadSegment getRoadSegment​(GeoLocation location)
        Replies the road segment with the given location.
        Parameters:
        location - a location
        Returns:
        the road segment or null if not found.
      • depthIterator

        @Pure
        default GraphIterator<RoadSegment,​RoadConnection> depthIterator​(RoadSegment startingSegment,
                                                                              double depth,
                                                                              double positionFromStartingPoint,
                                                                              RoadConnection startingPoint,
                                                                              boolean allowManyReplies,
                                                                              boolean assumeOrientedSegments)
        Description copied from interface: Graph
        Replies an iterator that permits to move along the segment's graph starting from the specified segment and from the specified starting point. If the specified starting point is not one of the ends of the segment, this function assumes to start from the point replied by GraphSegment.getBeginPoint().

        This function does not allow the cycles during the iterations.

        Specified by:
        depthIterator in interface Graph<RoadSegment,​RoadConnection>
        Parameters:
        startingSegment - is the first segment to iterate.
        depth - is the maximal depth to reach.
        positionFromStartingPoint - is the starting position from the startingPoint.
        startingPoint - is the starting point of the iterations.
        allowManyReplies - may be true to allow to reply many times the same segment, otherwhise false.
        assumeOrientedSegments - may be true to assume that the same segment has two different instances for graph iteration: the first instance is associated the first point of the segment and the second instance is associated to the last point of the segment. If this parameter is false to assume that the end points of a segment are not distinguished.
        Returns:
        the iterator.
        See Also:
        Graph.depthIterator(GraphSegment, double, double, GraphPoint, boolean, boolean, DynamicDepthUpdater)
      • depthIterator

        @Pure
        GraphIterator<RoadSegment,​RoadConnection> depthIterator​(RoadSegment startingSegment,
                                                                      double depth,
                                                                      double positionFromStartingPoint,
                                                                      RoadConnection startingPoint,
                                                                      boolean allowManyReplies,
                                                                      boolean assumeOrientedSegments,
                                                                      DynamicDepthUpdater<RoadSegment,​RoadConnection> dynamicDepthUpdater)
        Description copied from interface: Graph
        Replies an iterator that permits to move along the segment's graph starting from the specified segment and from the specified starting point. If the specified starting point is not one of the ends of the segment, this function assumes to start from the point replied by GraphSegment.getBeginPoint().

        This function does not allow the cycles during the iterations.

        Specified by:
        depthIterator in interface Graph<RoadSegment,​RoadConnection>
        Parameters:
        startingSegment - is the first segment to iterate.
        depth - is the maximal depth to reach.
        positionFromStartingPoint - is the starting position from the startingPoint.
        startingPoint - is the starting point of the iterations.
        allowManyReplies - may be true to allow to reply many times the same segment, otherwhise false.
        assumeOrientedSegments - may be true to assume that the same segment has two different instances for graph iteration: the first instance is associated the first point of the segment and the second instance is associated to the last point of the segment. If this parameter is false to assume that the end points of a segment are not distinguished.
        dynamicDepthUpdater - if not null, it is a lambda that is used for dynamically updating the maximal depth.
        Returns:
        the iterator.
        See Also:
        Graph.depthIterator(GraphSegment, double, double, GraphPoint, boolean, boolean)
      • iterator

        @Pure
        GraphIterator<RoadSegment,​RoadConnection> iterator​(RoadSegment starting_segment,
                                                                 RoadConnection starting_point,
                                                                 boolean allowManyReplies,
                                                                 boolean assumeOrientedSegments)
        Description copied from interface: Graph
        Replies an iterator that permits to move along the road segment's graph starting from this road segment and from the specified starting point.
        Specified by:
        iterator in interface Graph<RoadSegment,​RoadConnection>
        Parameters:
        starting_segment - is the first segment to iterate.
        starting_point - is the starting point of the iterations.
        allowManyReplies - may be true to allow to reply many times the same segment, otherwhise false.
        assumeOrientedSegments - may be true to assume that the same segment has two different instances for graph iteration: the first instance is associated the first point of the segment and the second instance is associated to the last point of the segment. If this parameter is false to assume that the end points of a segment are not distinguished.
        Returns:
        the iterator.
      • iterator

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

        @Pure
        Iterator<? extends RoadSegment> iterator​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds,
                                                 int budget)
        Iterates on the segments that intersect the specified bounds.
        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
        Iterable<? extends RoadSegment> toIterable​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds)
        Iterates on the segments that intersect the specified bounds.
        Parameters:
        bounds - is the rectangle inside which the replied elements must be located
        Returns:
        an iterator.
      • toIterable

        @Pure
        Iterable<? extends RoadSegment> toIterable​(Rectangle2afp<?,​?,​?,​?,​?,​?> bounds,
                                                   int budget)
        Iterates on the segments that intersect the specified bounds.
        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.