Experimental

Snaps trajectory points onto a line network and reconstructs an inferred route with diagnostics.

vector network map-matching

## Parameters

Name | Description | Required | Default
--- | --- | --- | ---
`input` | Input line network layer. | Required | `network.shp`
`trajectory_points` | Input trajectory point layer. | Required | `trajectory_points.shp`
`timestamp_field` | Trajectory field used for time ordering. | Required | `timestamp`
`search_radius` | Optional candidate search radius around each trajectory point. | Optional | `25.0`
`candidate_k` | Optional number of nearest candidates retained per point. | Optional | `5`
`snap_tolerance` | Optional node snapping tolerance for graph construction. | Optional | —
`max_snap_distance` | Optional max distance for snapping trajectory points to network nodes. | Optional | —
`edge_cost_field` | Optional numeric line field used as an impedance multiplier for segment length. | Optional | —
`one_way_field` | Optional line field marking one-way digitized edges (true/1/yes means from first to second vertex only). | Optional | —
`blocked_field` | Optional line field marking blocked/closed edges to exclude from routing (true/1/yes blocks). | Optional | —
`barriers` | Optional barrier point layer; nearest network nodes are blocked from traversal. | Optional | —
`barrier_snap_distance` | Optional max distance from each barrier point to a network node for blocking. | Optional | —
`turn_penalty` | Optional additive cost applied to non-straight turns at network nodes. | Optional | —
`u_turn_penalty` | Optional additive cost applied to U-turn transitions. | Optional | —
`forbid_u_turns` | If true, disallow U-turn transitions. | Optional | —
`forbid_left_turns` | If true, disallow left-turn transitions. | Optional | —
`forbid_right_turns` | If true, disallow right-turn transitions. | Optional | —
`turn_restrictions_csv` | Optional CSV of turn transitions using columns prev_x,prev_y,node_x,node_y,next_x,next_y. Optional columns: forbidden (default true when no turn_cost column is provided) and turn_cost (or penalty/cost/extra_cost) for per-turn additive cost. | Optional | —
`matched_points_output` | Optional output vector path for per-point diagnostics. | Optional | —
`match_report` | Optional JSON output path for summary diagnostics. | Optional | —
`output` | Output line vector path for inferred route. | Required | —

## Examples

Matches time-ordered trajectory points to a network and emits route and diagnostics outputs.

    wbe.map_matching_v1(candidate_k=5, input='network.shp', matched_points_output='matched_points.shp', output='matched_route.shp', search_radius=25.0, timestamp_field='timestamp', trajectory_points='trajectory_points.shp')

## Project Links

WbW Homepage User Manual Support WbW