I need to identify the closest line from a point. Elements are stored in a postgreSQL/postGIS database, in the same projection. From a point (geom multipoint to be specific), I need to identify the closest line (multilinestring) element from an other table.
Theoretically it should look like this :
SELECT myColumnLine FROM myLineTable WHERE ST_Closest(geomPoint, geomLine) LIMIT 1
I think ST_ClosestPoint can do the trick but I want to return line attribute, not coordinates.
(ST_Dump(geomPoint)).geom
and(ST_Dump(geomLine)).geom
but I can't see what to do after.