I have been following the guide in order to import PBF data into a PostGIS database: pgrouting - documentation. I have downloaded the Belgium PBF from Geofabrik and installed all extensions needed into my database.

Then I have successfully completed the pgr_createTopology, pgr_analyzegraph and pgr_analyzeoneway steps in the documentation.

The next step is to the pgr_nodeNetwork function onto the table in order to check if the data is noded correctly. But when executing this step onto my table I keep on getting an error. I execute the function select pgr_nodeNetwork('planet_osm_line', 0.001, 'way', 'osm_id'); with also declaring both the geom and the id column names. The problem isn't solved when I rename both columns to the default names used by the pgr_nodeNetwork function.

NOTICE:  id: way
NOTICE:  the_geom: osm_id
NOTICE:  table_ending: noded
NOTICE:  rows_where: 
NOTICE:  outall: f
NOTICE:  pgr_nodeNetwork('planet_osm_line', 0.001, 'way', 'osm_id', 'noded', '',  f)
NOTICE:  Performing checks, please wait .....
NOTICE:  ERROR: Can NOT determine the srid of the geometry "osm_id" IN table public.planet_osm_line

1 Answer 1


Take the hints from the function output and compare with the docs carefully; the function signature is defined as [emphasis mine; slightly reduced to lessen confusion]:

pgr_nodenetwork(edge_table, tolerance, id, the_geom, table_ending, rows_where, outall) RETURNS TEXT

and your progress messages read

NOTICE:  id: way
NOTICE:  the_geom: osm_id

You want to pass in the id column before the geometry column:

SELECT pgr_nodeNetwork('planet_osm_line', 0.001, 'osm_id', 'way');
  • Thanks you for the answer! I did not notice it because in all the previous functions it was the other way around.
    – Stephen
    Oct 2, 2021 at 11:20

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.