In PostGIS, I have a dataset with road segments including a column with coordinates for the various segments. The coordinates are in a lat-long format and the data type of the column is character varying, plus it contains a varying number of coordinates in each row (see attached image).
What I wish to do is to be able to show the segments as geometric linestrings in order to later match them to a road network and/or a map.
I've already tried using ST_GeomFromText (see below) and ST_DumpPoint, but without any luck.
SELECT ST_GeomFromText('LINESTRING('||coordinates||')') as geom FROM vejnet.segmentnetdatex2format;
Which results in the following error code
ERROR: parse error - invalid geometry HINT: "LINESTRING(55.67258,1" <-- parse error at position 21 within geometry SQL state: XX000
I'm still fairly new to PostGIS and working with GIS/spatial data in general.