I have loaded my data with osm2pgrouting and I have my network with ways (Linestring) and nodes (Point). The problem is : I have a database of doctors addresses (point) and I should calculate the distance between these points and my ways (Linestring).
I am using the following query :
SELECT ST_Distance ( ST_GeomFromText('POINT(55.4504545699355 -20.8752577759738)',4326), ST_GeomFromText('LINESTRING(55.4748349 -27.1342723, 55.4747091 -21.1338699)',4326) ) As ST_DISTANCE;
But I don't think that works. I need to calculate the distance from all the doctors points and represent that in QGIS as a linestring.
Any help or advice?