Linear Referencing — Tool Reference
Snap Events To Routes
Function name: snap_events_to_routes
No help documentation available for this tool.
Route Event Governance For Linear Assets
Function name: route_event_governance_for_linear_assets
PROProduction
Workflow-grade Pro analysis with audit-ready outputs.
workflow pro
Workflow Narrative
Route Event Governance
Who It Is For
- Departments of Transportation managing pavement/paving event datasets.
- Pipeline operators maintaining linear segment datasets (coating, pressure class, material type).
- Rail and powerline operators tracking inspection or maintenance event inventories.
- GIS production teams responsible for LRS data quality before system integration.
Primary User
DOTs, pipeline operators, rail/powerline operators, and telecom managers.
What It Does
- Validates route event datasets (line segments with from/to measures) against production governance rules.
- Detects overlapping events (events sharing measure ranges on the same route).
- Detects measure gaps (discontinuities between sequential events).
- Detects descending intervals (to_measure ParameterTypeRequiredDescription
eventsVector pathRequiredEvent layer (GeoPackage, GeoJSON, Shapefile) with route ID and from/to measure fieldsroute_id_fieldstringRequiredField name containing route identifiersfrom_measure_fieldstringRequiredField name for interval start measureto_measure_fieldstringRequiredField name for interval end measuregap_tolerancefloatOptionalGaps smaller than this value are not flagged (default 0.0)overlap_tolerancefloatOptionalOverlaps smaller than this value are not flagged (default 0.0)auto_fixboolOptionalEnable auto-correction of descending intervals and trimming of overlaps (default false)domain_rules_jsonpathOptionalJSON file defining per-field validation rules withallowed_values,regex,min, andmaxchecksgoverned_eventsvector pathRequiredOutput path for QA-passed events with GOVERNANCE_STATUS and CORRECTIONS attributesissues_csvpathRequiredOutput CSV path for per-event issue logcorrected_eventsvector pathOptionalOutput path for auto-corrected events (only written when auto_fix=true)governance_reportpathRequiredOutput JSON path for governance summary reportremediation_queue_csvpathOptionalOptional prioritized remediation queue with recommended corrective action
Outputs
OutputTypeContents
governed_eventsVectorQA-passed events; attributes include GOVERNANCE_STATUS ("PASSED"/"CORRECTED") and CORRECTIONS (correction type or "none")
issues_csvCSVPer-violation log: event_id, route_id, rule_violated, severity, description, measure_start, measure_end
corrected_eventsVectorOnly written when auto_fix=true; lists corrected events with CORR_TYPE, ORIG_FROM, ORIG_TO, CORR_FROM, CORR_TO columns
governance_reportJSONSummary: total_events, passed_events, failed_events, pass_rate_percent, rules_violated, severity_distribution, correctable_count, domain_rules_applied
remediation_queue_csvCSVPrioritized queue with rule category, severity, and recommended corrective action
Python Example
`env = WbEnvironment(license_tier="pro")
result = env.run_tool("route_event_governance_for_linear_assets", events="pavement_events.gpkg", route_id_field="ROUTE_ID", from_measure_field="FROM_MEAS", to_measure_field="TO_MEAS", gap_tolerance=0.5, overlap_tolerance=0.1, auto_fix=True, domain_rules_json="output/route_event_rules.json", governed_events="output/governed_events.gpkg", issues_csv="output/issues.csv", corrected_events="output/corrected_events.gpkg", governance_report="output/governance_report.json", remediation_queue_csv="output/remediation_queue.csv", )
import json report = json.loads(open(result["governance_report"]).read()) print(f"Pass rate: {report['pass_rate_percent']:.1f}% " f"({report['passed_events']}/{report['total_events']} events)")`
License Notice
Use of this function requires a license for Whitebox Workflows Professional (WbW-Pro). Please visit www.whiteboxgeo.com to purchase a license.
Locate Points Along Routes
Function name: locate_points_along_routes
Experimental
Locates point features along route lines and writes route-measure attributes.
vector linear-referencing routes points
Parameters
NameDescriptionRequiredDefault
routesInput route line layer.Requiredroutes.shp
pointsInput point layer to locate along routes.Requiredevents.shp
max_offset_distanceOptional maximum point-to-route offset distance.Optional—
outputOutput point vector path.Required—
Examples
Adds route-measure attributes to points by locating them on the nearest route.
wbe.locate_points_along_routes(max_offset_distance=25.0, output='located_points.shp', points='events.shp', routes='routes.shp')
Points Along Lines
Function name: points_along_lines
Experimental
Creates regularly spaced point features along input line geometries.
vector points lines
Parameters
NameDescriptionRequiredDefault
inputInput line layer.Requiredlines.shp
spacingSpacing distance between points.Required50.0
include_endInclude line endpoints (default true).OptionalTrue
outputOutput point vector path.Required—
Examples
Creates points at fixed spacing along each line.
wbe.points_along_lines(include_end=True, input='lines.shp', output='points_along_lines.shp', spacing=50.0)
Route Calibrate
Function name: route_calibrate
Experimental
Calibrates route start/end measures from control points with known measures.
vector linear-referencing calibration
Parameters
NameDescriptionRequiredDefault
routesInput route line layer.Requiredroutes.gpkg
control_pointsInput control-point layer.Requiredcontrol_points.gpkg
control_measure_fieldControl-point field containing known measure values.Requiredmeasure
route_id_fieldOptional route identifier field in routes. Defaults to feature FID.Optional—
control_route_id_fieldOptional route identifier field in control points. Defaults to feature FID.Optional—
from_measure_fieldOutput field for route start measure (default 'from_measure').Optional—
to_measure_fieldOutput field for route end measure (default 'to_measure').Optional—
snap_toleranceMaximum control-point offset distance from route geometry (default 1.0).Optional1.0
outputOutput calibrated route layer.Required—
Examples
Calibrates route start/end measures using route control points.
wbe.route_calibrate(control_measure_field='measure', control_points='control_points.gpkg', control_route_id_field='route_id', output='routes_calibrated.gpkg', route_id_field='route_id', routes='routes.gpkg', snap_tolerance=1.0)
Route Event Lines From Layer
Function name: route_event_lines_from_layer
Experimental
Creates routed line events from an event vector layer using from/to measures.
vector linear-referencing events
Parameters
NameDescriptionRequiredDefault
routesInput route line layer.Requiredroutes.gpkg
eventsInput event vector layer.Requiredline_events.gpkg
event_route_fieldEvent-layer field containing route identifiers.Requiredroute_id
from_measure_fieldEvent-layer field containing start measures.Requiredfrom_m
to_measure_fieldEvent-layer field containing end measures.Requiredto_m
route_id_fieldOptional route-layer field containing route identifiers. Defaults to feature FID.Optional—
write_event_fidWrite EVENT_FID to preserve source event feature IDs (default true).OptionalTrue
write_event_xyWrite source event geometry X/Y attributes (default false).OptionalFalse
outputOutput line vector path.Required—
Examples
Creates line events on routes from from/to measures in an event vector layer.
wbe.route_event_lines_from_layer(event_route_field='route_id', events='line_events.gpkg', from_measure_field='from_m', output='route_event_lines_layer.gpkg', route_id_field='RID', routes='routes.gpkg', to_measure_field='to_m', write_event_fid=True, write_event_xy=False)
Route Event Lines From Table
Function name: route_event_lines_from_table
Experimental
Creates routed line events from a CSV event table and a route layer using from/to measures.
vector linear-referencing events csv
Parameters
NameDescriptionRequiredDefault
routesInput route line layer.Requiredroutes.gpkg
eventsInput CSV event table path.Requiredline_events.csv
event_route_fieldCSV field containing route identifiers.Requiredroute_id
from_measure_fieldCSV field containing start measures.Requiredfrom_m
to_measure_fieldCSV field containing end measures.Requiredto_m
route_id_fieldOptional route-layer field containing route identifiers. Defaults to feature FID.Optional—
outputOutput line vector path.Required—
Examples
Creates line events on routes from from/to measures stored in a CSV table.
wbe.route_event_lines_from_table(event_route_field='route_id', events='line_events.csv', from_measure_field='from_m', output='route_event_lines.gpkg', route_id_field='RID', routes='routes.gpkg', to_measure_field='to_m')
Route Event Merge
Function name: route_event_merge
Experimental
Merges adjacent compatible route events.
vector linear-referencing events merge
Parameters
NameDescriptionRequiredDefault
eventsInput event layer containing route intervals.Requiredevents.gpkg
event_route_fieldEvent-layer route identifier field.Requiredroute_id
from_measure_fieldEvent-layer interval start field.Requiredfrom_m
to_measure_fieldEvent-layer interval end field.Requiredto_m
group_fieldsOptional comma-delimited fields used for merge compatibility. Defaults to all non-measure fields.Optional—
gap_toleranceMaximum gap allowed for adjacency merge (default 0.0).Optional0.0
conflict_modeOverlap handling mode: error|skip (default error).Optionalerror
outputOutput merged-event layer.Required—
Examples
Merges compatible adjacent events on each route.
wbe.route_event_merge(conflict_mode='error', event_route_field='route_id', events='events.gpkg', from_measure_field='from_m', gap_tolerance=0.0, group_fields='route_id,road_class,speed', output='events_merged.gpkg', to_measure_field='to_m')
Route Event Overlay
Function name: route_event_overlay
Experimental
Overlays two route event layers by interval overlap.
vector linear-referencing events overlay
Parameters
NameDescriptionRequiredDefault
primary_eventsPrimary event layer.Requiredprimary_events.gpkg
overlay_eventsOverlay event layer.Requiredoverlay_events.gpkg
primary_route_fieldPrimary layer route identifier field.Requiredroute_id
primary_from_measure_fieldPrimary layer interval start field.Requiredfrom_m
primary_to_measure_fieldPrimary layer interval end field.Requiredto_m
overlay_route_fieldOverlay layer route identifier field.Requiredroute_id
overlay_from_measure_fieldOverlay layer interval start field.Requiredfrom_m
overlay_to_measure_fieldOverlay layer interval end field.Requiredto_m
min_overlap_lengthMinimum overlap length to keep (default 0.0).Optional0.0
outputOutput overlay layer.Required—
Examples
Computes overlapping route-event intervals between two event layers.
wbe.route_event_overlay(min_overlap_length=0.0, output='events_overlay.gpkg', overlay_events='overlay_events.gpkg', overlay_from_measure_field='from_m', overlay_route_field='route_id', overlay_to_measure_field='to_m', primary_events='primary_events.gpkg', primary_from_measure_field='from_m', primary_route_field='route_id', primary_to_measure_field='to_m')
Route Event Points From Layer
Function name: route_event_points_from_layer
Experimental
Creates routed point events from an event vector layer and a route layer.
vector linear-referencing events
Parameters
NameDescriptionRequiredDefault
routesInput route line layer.Requiredroutes.gpkg
eventsInput event vector layer.Requiredpoint_events.gpkg
event_route_fieldEvent-layer field containing route identifiers.Requiredroute_id
measure_fieldEvent-layer field containing point-event measures.Requiredmeasure
route_id_fieldOptional route-layer field containing route identifiers. Defaults to feature FID.Optional—
write_event_fidWrite EVENT_FID to preserve source event feature IDs (default true).OptionalTrue
write_event_xyWrite source event geometry X/Y attributes (default false).OptionalFalse
outputOutput point vector path.Required—
Examples
Creates point events on routes from measure values in an event vector layer.
wbe.route_event_points_from_layer(event_route_field='route_id', events='point_events.gpkg', measure_field='measure', output='route_event_points_layer.gpkg', route_id_field='RID', routes='routes.gpkg', write_event_fid=True, write_event_xy=False)
Route Event Points From Table
Function name: route_event_points_from_table
Experimental
Creates routed point events from a CSV event table and a route layer.
vector linear-referencing events csv
Parameters
NameDescriptionRequiredDefault
routesInput route line layer.Requiredroutes.gpkg
eventsInput CSV event table path.Requiredpoint_events.csv
event_route_fieldCSV field containing route identifiers.Requiredroute_id
measure_fieldCSV field containing point-event measures.Requiredmeasure
route_id_fieldOptional route-layer field containing route identifiers. Defaults to feature FID.Optional—
outputOutput point vector path.Required—
Examples
Creates point events on routes from measure values stored in a CSV table.
wbe.route_event_points_from_table(event_route_field='route_id', events='point_events.csv', measure_field='measure', output='route_event_points.gpkg', route_id_field='RID', routes='routes.gpkg')
Route Event Split
Function name: route_event_split
Experimental
Splits route events by per-route boundary measures.
vector linear-referencing events split
Parameters
NameDescriptionRequiredDefault
eventsInput event layer containing route intervals.Requiredevents.gpkg
boundariesInput boundary layer containing route measure breakpoints.Requiredevent_boundaries.gpkg
event_route_fieldEvent-layer route identifier field.Requiredroute_id
from_measure_fieldEvent-layer interval start field.Requiredfrom_m
to_measure_fieldEvent-layer interval end field.Requiredto_m
boundary_route_fieldBoundary-layer route identifier field.Requiredroute_id
boundary_measure_fieldBoundary-layer measure field.Requiredmeasure
min_segment_lengthOptional minimum split segment length to keep (default 0.0).Optional0.0
outputOutput split-event layer.Required—
Examples
Splits route event intervals at supplied route measure boundaries.
wbe.route_event_split(boundaries='event_boundaries.gpkg', boundary_measure_field='measure', boundary_route_field='route_id', event_route_field='route_id', events='events.gpkg', from_measure_field='from_m', min_segment_length=0.0, output='events_split.gpkg', to_measure_field='to_m')
Route Measure QA
Function name: route_measure_qa
Experimental
Diagnoses route-event measure gaps, overlaps, non-monotonic sequences, and duplicate measures.
vector linear-referencing qa diagnostics
Parameters
NameDescriptionRequiredDefault
eventsInput event layer containing route intervals.Requiredevents.gpkg
route_fieldRoute identifier field.Requiredroute_id
from_measure_fieldInterval start field.Requiredfrom_m
to_measure_fieldInterval end field.Requiredto_m
gap_toleranceGap tolerance (default 0.0).Optional0.0
overlap_toleranceOverlap tolerance (default 0.0).Optional0.0
outputOutput QA diagnostics layer.Required—
Examples
Generates route-measure diagnostics for interval event data.
wbe.route_measure_qa(events='events.gpkg', from_measure_field='from_m', gap_tolerance=0.0, output='route_measure_qa.gpkg', overlap_tolerance=0.0, route_field='route_id', to_measure_field='to_m')
Route Recalibrate
Function name: route_recalibrate
Experimental
Recalibrates edited route measures from a reference route layer while preserving route measure continuity.
vector linear-referencing recalibration
Parameters
NameDescriptionRequiredDefault
original_routesReference routes containing prior calibrated measures.Requiredroutes_original.gpkg
edited_routesEdited routes to recalibrate.Requiredroutes_edited.gpkg
route_id_fieldOptional shared route identifier field. Defaults to feature FID.Optional—
from_measure_fieldMeasure-start field name (default 'from_measure').Optional—
to_measure_fieldMeasure-end field name (default 'to_measure').Optional—
outputOutput recalibrated route layer.Required—
Examples
Scales edited route measures from a previously calibrated route layer.
wbe.route_recalibrate(edited_routes='routes_edited.gpkg', original_routes='routes_original.gpkg', output='routes_recalibrated.gpkg', route_id_field='route_id')