I have a table in PostGIS & PostgreSQL with a LINESTRING column. I am constructing a query that’s the result of joining this table with itself, and I know that the geometry columns (call them geom) of each one connect, i.e. the first row is a LINESTRING from A--B--…---K and the second row is K--L--…--T, i.e. the last point of the first LINESTRING is the same as the first point of the second LINESTRING.
Is there some function/expression where “concatinate”/”join”/”merge”/”extend” these 2 LINESTRINGs into 1 LINESTRING that looks like A--B--…--K--L--…--T?
You could use ST_Union in a query like this: