This PR implements the basic logic how HFP observations are matched to link_on_route links, enabling simple space-time visualizations of HFP observations along sections, for instance. The next step from here is to create a data model and data transformation functions that aggregate observations along a link into per-link aggregate values, such as run times through links and, from them, mean speeds and their distributions.
Note that the point-to-link matching algorithm is still very simple here: it just matches each HFP point to the nearest link on their scheduled route. This is not a problem as long as route geometries are simple - but as soon as a route makes a loop, U-turn, self-intersects or something similar, finding the closest link only geometrically is no longer enough. In addition, we should take HFP point and link on route order in time into account. In 2020, I created a procedure that did this to some extent, but it was overly complex in general, so I decided to start it simple now, and develop the algorithm further step by step.
@haphut if you have time before this week's meeting, you can take a cursory glance over this PR and comment if you find something odd or interesting here.
This PR implements the basic logic how HFP observations are matched to
link_on_route
links, enabling simple space-time visualizations of HFP observations alongsections
, for instance. The next step from here is to create a data model and data transformation functions that aggregate observations along a link into per-link aggregate values, such as run times through links and, from them, mean speeds and their distributions.Note that the point-to-link matching algorithm is still very simple here: it just matches each HFP point to the nearest link on their scheduled route. This is not a problem as long as route geometries are simple - but as soon as a route makes a loop, U-turn, self-intersects or something similar, finding the closest link only geometrically is no longer enough. In addition, we should take HFP point and link on route order in time into account. In 2020, I created a procedure that did this to some extent, but it was overly complex in general, so I decided to start it simple now, and develop the algorithm further step by step.