I am new of Pgrouting, I have created a new database with PostGIS and PgRouting extension, than I have populated my DB using the osm2po sotware and now I have my graphs. However I need to create the vertices table in order to make the network routable, I run the following command:

SELECT pgr_createTopology('grafo_padova', 0.00001, 'the_geom', 'id');

Postgres returns

NOTIFICA: PROCESSING: NOTIFICA: pgr_createTopology('grafo_padova', 1e-005, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f) NOTIFICA: Performing checks, please wait ..... NOTIFICA: Creating Topology, Please wait... NOTIFICA: -------------> TOPOLOGY CREATED FOR 0 edges NOTIFICA: Rows with NULL geometry or NULL id: 0 NOTIFICA: Vertices table for table public.grafo_padova is: public.grafo_padova_vertices_pgr NOTIFICA: ----------------------------------------------

Successfully run. Total query runtime: 77 msec. 1 rows affected.

And the result is an empty table. The table "grafo_padova" has a geometry column named "the_geom" and it is filled.

Can someone help?

2 Answers 2


Can you make sure, that id and the_geom attribute exist?

However, if you already have the topology computed with osm2po, then you can just run pgr_createVerticesTable function to add the vertices table: http://docs.pgrouting.org/2.4/en/pgr_createVerticesTable.html#pgr-create-vert-table

  • Thanks a lot, using pgr_createVerticesTable everything works fine Aug 17, 2017 at 21:47

Recreating topology without cleaning up won't make sense and you will get an empty pgr table.

Set method parameter clean = true if you had created topology on the edge table before.


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.