I have a data set of roads which is line and its projection system is
WGS UTM (EPSG:32639) I have added it into my database and created a topology using this query
SELECT pgr_createTopology('ways', 0.00001, 'geom_2d', 'gid',rows_where := 'gid>0', clean := TRUE);
The above query works fine. But When I try to route using any alogorithm such as this query
SELECT id1 as path,b.geom as the_geom FROM pgr_dijkstra('SELECT gid as id, source, target, st_length(geom_2d) as cost FROM ways', 483,507,FALSE ,FALSE) a, ways b WHERE a.id1=b.gid
It returns some lines which are not a route at all. Here is an example
In above image the yellow lines is my edges, points are vertexes which are created by
pgr_createTopology and blue lines is the result of routing
I have tested different values of
tolerance such as
0.001 and for some of them there is no result and for some f them the result is exactly the same, I think there is something wrong with layers topology but I can not figure out how to fix it.
Can you help me to fix my problem?
edit 1: here is the result of this query
SELECT * FROM "ways" WHERE gid=483 or gid=507