Experimental

Finds a mode-aware shortest path over a line network with configurable transfer penalties.

vector network multimodal shortest-path

Parameters

NameDescriptionRequiredDefault
inputInput line network layer.Requirednetwork.shp
start_xStart x coordinate.Required0.0
start_yStart y coordinate.Required0.0
end_xEnd x coordinate.Required100.0
end_yEnd y coordinate.Required100.0
mode_fieldLine attribute field that identifies travel mode per segment.RequiredMODE
snap_toleranceOptional node snapping tolerance for graph construction.Optional
max_snap_distanceOptional max distance from start/end coordinates to nearest network node.Optional
default_mode_speedDefault mode speed in coordinate-units per time unit (default: 1).Optional1.0
mode_speed_overridesOptional comma-separated mode:speed overrides (for example: walk:1.4,drive:12,transit:8).Optional
allowed_modesOptional comma-separated allow-list of modes to include in routing.Optional
transfer_penaltyOptional additive penalty applied each time the route changes mode.Optional0.0
outputOutput line vector path.Required

Examples

Routes between two coordinates using mode-aware costs and transfer penalties.

wbe.multimodal_shortest_path(default_mode_speed=1.0, end_x=100.0, end_y=100.0, input='network.shp', mode_field='MODE', mode_speed_overrides='walk:1.4,transit:8', output='multimodal_shortest_path.shp', start_x=0.0, start_y=0.0, transfer_penalty=0.0)

Demonstrates walk-drive routing with mode filtering and transfer penalty.

wbe.multimodal_shortest_path(allowed_modes='walk,drive', default_mode_speed=1.0, end_x=100.0, end_y=100.0, input='network.shp', mode_field='MODE', mode_speed_overrides='walk:1.4,drive:12', output='multimodal_walk_drive_path.shp', start_x=0.0, start_y=0.0, transfer_penalty=2.0)

Demonstrates walk-transit routing with mode filtering and transfer penalty.

wbe.multimodal_shortest_path(allowed_modes='walk,transit', default_mode_speed=1.0, end_x=100.0, end_y=100.0, input='network.shp', mode_field='MODE', mode_speed_overrides='walk:1.4,transit:8', output='multimodal_walk_transit_path.shp', start_x=0.0, start_y=0.0, transfer_penalty=1.0)

Project Links

WbW Homepage User Manual Learn More