Hello i have the coordinates from two points(x,y) and i have a database with roads and i want to find with dijstrak algorithm wich road i take but the algorithm want source and target but in my application i take only (x,y) coordinates
SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_dijkstra( 'SELECT id, source, target, cost FROM edge_table', 7, 12, false, false );
Can sameone help me ?
UPDATE I try this but i take all gid from table roads and not the gid it is close of the point
SELECT gid, ST_Distance(ST_Transform(ST_GeomFromText('POINT(39.240443 26.208803)',3857),4326),geom) AS myLineDistance FROM roads WHERE geom && ST_expand(ST_Transform(ST_GeomFromText('POINT(39.240443 26.208803)',3857),4326), 100);