I am using PostgeSQL 9.5 and pgRouting 2.1.0. I am trying to test pgRouting tool in my postgres DB by following this tutorial pgRouting 2.0 for Quick Windows Guide. Although the tutorial assumes road transport network data of Vienna in GEOJSON format but due to unavailability of data at mentioned link, I used my own data and converted the ESRI shapefile (16,060 rows) to GEOJSON using QGIS. Then, I used QGIS DB Manager to import street.geojson file to my postgres "routing" DB. As per tutorial, I used following commands to add "source" and "target" columns as well as to create topology.
alter table public.street add column source integer; alter table public.street add column target integer; select pgr_createTopology('public.street', 0.0001, 'geom', 'id');
However, when I used following set of commands to test pgr_dijkstra algorithm:
SELECT seq, id1 AS node, id2 AS edge, cost, geom FROM pgr_dijkstra( 'SELECT id, source, target, st_length(geom) as cost FROM public.street', 1, 3000, false, false ) as di JOIN public.street pt ON di.id2 = pt.id;
the query runs successfully but I am not getting any output.
Can anyone help me to understand what's wrong with my processing?
After running the query to identify the records, the results are as under: