I've got a road network dataset and a dataset that consist of multiple disconnected lines of varying lengths in PostGIS.
Most of these lines are (largely) parallel to the road network, but the distance between these lines and the road network can differ. Since these lines tell something about the condition of the road segments that are parallel to these lines, I would like to create a new line segment that is aligned with the closest road segment. The blue lines in the example below is what I eventually would like to achieve.
Does anyone have an idea how to solve this in PostGIS?

