Experimental

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

vector network multimodal shortest-path

## Parameters

Name | Description | Required | Default
--- | --- | --- | ---
`input` | Input line network layer. | Required | `network.shp`
`start_x` | Start x coordinate. | Required | `0.0`
`start_y` | Start y coordinate. | Required | `0.0`
`end_x` | End x coordinate. | Required | `100.0`
`end_y` | End y coordinate. | Required | `100.0`
`mode_field` | Line attribute field that identifies travel mode per segment. | Required | `MODE`
`snap_tolerance` | Optional node snapping tolerance for graph construction. | Optional | —
`max_snap_distance` | Optional max distance from start/end coordinates to nearest network node. | Optional | —
`default_mode_speed` | Default mode speed in coordinate-units per time unit (default: 1). | Optional | `1.0`
`mode_speed_overrides` | Optional comma-separated mode:speed overrides (for example: walk:1.4,drive:12,transit:8). | Optional | —
`allowed_modes` | Optional comma-separated allow-list of modes to include in routing. | Optional | —
`transfer_penalty` | Optional additive penalty applied each time the route changes mode. | Optional | `0.0`
`output` | Output 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 Support WbW