2

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?

2

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'

0

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.

0

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 – DPSSpatial Apr 7 '16 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 '16 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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