Though a newbie to PostGIS, I'm having trouble solving something that I think should be farily straightforward.
I have two linestring tables, both consisting of simple, 2-node line objects: one has the segments of exploded road centre-lines ('r_lines'), while the other has lines ('a_lines') from an addresspoint to the nearest point on the nearest centre-line segment, which in most cases is neither the start nor end node of that roadline segment.
Ultimately I need to have a table consisting entirely of (connected) 2-pt linestrings.
I haven't been able to figure out how to introduce the one endpoint of the a_lines into the r_lines to create new segments, and the problem seems to be that one r_line segment might be intersected by several a_lines. So a previously described method for adding vertices to linestrings by breaking and re-merging can't be directly applied, unless I could do it iteratively (which I don't know how to do).
I have also tried dropping all the points into one table and then creating a new linestring with the grouping method described here. This did create lines, but not the ones I was expecting, as they frequently seemed to double-back on each oter.
Grateful for any suggestions.
(And apologies for the purely textual description: as a new user of little reputation I'm prevented from uploading a helpful illustration.)