Generate segments from a table where each row provides a chainage (PK) point, associated with ROUTE_ID and PAIR_ID (pairing identifier).

HOW IT WORKS

For each (ROUTE_ID, PAIR_ID): • Sort chainage (PK) points numerically. • Pair sequentially: (0–1), (2–3), (4–5)... • If one chainage (PK) point is left unpaired, it is ignored and the warning {self.WARN_ODD_PK_IGNORED} is logged.

INPUTS

Calibrated line layer (M) and its ROUTE_ID field • Events (PK) table with fields: ROUTE_ID, PAIR_ID, Chainage (PK)M units (m or km) • Segment: Chainage (PK) value + ROUTE_ID value + PAIR_ID value

OPTIONS

Add table fields to output (optional). • Generate endpoint points (optional).

ADVANCED OPTIONS

Tolerance (km): helps resolve small mismatches within a calibrated segment (does not fill gaps). • Snap to the nearest available chainage (PK) point: if an endpoint falls in a gap, it can be adjusted to the nearest valid chainage point (PK). • Generate issues table: logs adjustments/warnings/errors per segment.

OUTPUTS

Extracted segments with typical fields: ROUTE_ID, PAIR_ID, PK_INI, PK_FIN, DIST_PK_KM, DIST_GEOM_KM, ADJUSTED, ADJUST_REASON, N_PIECES, STATUS. • Endpoint points (optional) with PK_REQ, PK, ADJUSTED, ADJUST_REASON. • Issues (table) (optional) with WARNINGS (e.g. {self.WARN_SEGMENT_SPLIT}, {self.WARN_ODD_PK_IGNORED}) and CRITICALS.

DETAILS

See the plugin README: Locate segments from points/events (PK) table.