get_road_sections_from_snapped_line(_line geometry, _tolerance real DEFAULT 1)


Description

Return the ordered list of the roads followed by the given line, with the start and end references (marker, abscissa and cumulative) for each road, the direction (downstream or upstream) and the line portion on this road. The line must follow the road graph edges, for example the result of the function get_snapped_line_from_track. The parameter _tolerance (default 1m) is the maximum distance between the line and the edges. A line without SRID is considered to be in the road graph projection, and other lines are reprojected. Example of output (the geom column is not shown): road_order | road_code | start_marker | start_abscissa | start_cumulative | end_marker | end_abscissa | end_cumulative | direction | length ————+—————+————–+—————-+——————+————+————–+—————-+————+——– 1 | D40 | 14 | 905.27 | 16361.8 | 15 | 396.15 | 16761.4 | downstream | 399.6 2 | GIR_D40_D16-1 | 0 | 0 | 0 | 0 | 39.17 | 39.17 | downstream | 39.17 3 | D16 | 0 | 716.82 | 716.82 | 0 | 1.62 | 1.62 | upstream | 715.19

Parameters

Name Type Mode
_line geometry IN
_tolerance real IN
road_order integer TABLE
road_code text TABLE
start_marker integer TABLE
start_abscissa real TABLE
start_cumulative real TABLE
end_marker integer TABLE
end_abscissa real TABLE
end_cumulative real TABLE
direction text TABLE
length real TABLE
geom geometry TABLE

Definition