I followed the instructions for loading OSM data into pgrouting found here: http://anitagraser.com/2011/12/18/osm2po-part-2-pgrouting-on-osm-the-easy-way/

Everything works fine using osm2po to calculate a route, so I assume I setup everything correctly. However...

In QGIS when I load the database and fire up the pgrouting layer plugin, I get an error when I try to select the node nearest node to calculate a route from.

"Relations Roads Does not exist: enter image description here

Any ideas or help?

3 Answers 3


Have a look at your database either in PGAdmin or through the QGIS Browser panel and check to see what your tables are named vs. what the example states.

My 'edge_table' is called 'ways'

my 'id' is called 'gid'


Solved! It looks like there have been a few updates to the plugin since the example was made. The problem was with the edge_table and geometry fields. Edge table is the table containing the routing network, and geometry is the specific geometry table with the table.

Hope that helps someone else.


Have a closer look into the screenshot you posted yourself. The checkbox points to a table called hh_2po_4pgr. This might be your edge-table. If so, the the_geom column is geom_way. Also check has_reverse_cost, otherwise oneways will be ignored.

  • that's just a layer in the QGIS layers panel... not part of the pgRouting Layer plugin Apr 7, 2016 at 21:47
  • Yes. But I think QGIS uses the table name as layer name if not modified. hh_2po_4pgr is propably the name of the needed table
    – Carsten
    Apr 17, 2016 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.