1

I'm using pgRouting and I'm going through the manual (Release 2.1.0) and in chapter five, it says:

• pgr_createTopology - to create a topology based on the geometry.

• pgr_createVerticesTable - to reconstruct the vertices table based on the source and target information.

When I run them, I get the exact same outputs. Both pgr_createtopology and pgr_createverticestable give me a new layer public.network_vertices_pgr with:

              id|cnt|chk|ein|eou|the_geom 

As far as I can tell the two functions are doing the exact same thing, and it would be redundant to run both of them, I just wanted to see if there is a difference that I'm overlooking.

  • pgr_createTopology populates the source & target columns of the given network table by finding its geometric connectivity (intersection of endpoints, with optional threshold), and produces the nodes table as a 'side effect'. pgr_createVerticeTable recreates the node table by reading out previously populated source & target columns of the edge table. – ThingumaBob Feb 23 at 9:11
  • The comment before is correct, just adding, that pgr_createVerticeTable can be handy, if you copied a network table into a new daatabase and forgot to also copy the vertices table. Or sometimes your data already has source and target column and you want to have a list of all nodes. – dkastl Feb 24 at 3:38

Your Answer

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

Browse other questions tagged or ask your own question.