Class NetworkAndRoadJoiner
java.lang.Object
rgu.transport.geospatial.multimodal.NetworkAndRoadJoiner
Used to join a transit network to a road network. Artificial edges are added to connect each
point on the transit network with a nearby point on the road network as the crow flies.
Artificial edges in the given network are discarded.
- Author:
- Lee A. Christie
-
Method Summary
Modifier and TypeMethodDescriptionstatic TransitNetworkjoin(TransitNetwork transitNetwork, Graph<GeoLocation, RoadEdge> roadGraph, Speed drivingSpeed, Speed walkingSpeed, Distance maxDistanceToNearbyRoad, BiConsumer<GeoLocation, GeoLocation> consumerRoadEdge, BiConsumer<GeoLocation, GeoLocation> consumerTransitEdge, BiConsumer<GeoLocation, GeoLocation> consumerArtificialEdge, ProgressListener progress) Joins a transit network to a road network.
-
Method Details
-
join
public static TransitNetwork join(TransitNetwork transitNetwork, Graph<GeoLocation, RoadEdge> roadGraph, Speed drivingSpeed, Speed walkingSpeed, Distance maxDistanceToNearbyRoad, BiConsumer<GeoLocation, GeoLocation> consumerRoadEdge, BiConsumer<GeoLocation, GeoLocation> consumerTransitEdge, BiConsumer<GeoLocation, GeoLocation> consumerArtificialEdge, ProgressListener progress) throws InterruptedException Joins a transit network to a road network.- Parameters:
transitNetwork- the transit network, not nullroadGraph- the road graph, not nulldrivingSpeed- the driving speed, not nullwalkingSpeed- the walking speed, not nullmaxDistanceToNearbyRoad- the maximum distance to walk between a location on the transit network and a location on the road graph, not nullconsumerRoadEdge- callback for road edges, can be null if not neededconsumerTransitEdge- callback for transit edges, can be null if not neededconsumerArtificialEdge- callback for artificial edges, can be null if not neededprogress- the progress listener, can be null if not needed- Throws:
InterruptedException
-