2

I have successfully manage to make the workshop from of pgrouting (wrote for v1) with pgrouting v2. Now I want to use pgrouting 2 on my postgis database created with osm2pgsql.

The problem is first to create the segments and this blog post was very helpfull for this. However,I get:

gis=# select pgr_createTopology('network', 0.01, 'the_geom', 'gid');
ERROR:  We can not determine the srid of "network.the_geom"!

Is there a way to set the srid properly so that pgr_createTopology finds it. Or is there an alternative way? I can't believe osm2pgrouting is the only importer for pgrouting. Thanks

1 Answer 1

1

First of all take a look in the "geometry_columns" table to see if there is a record for your table, that shows if there is the right SRID. There is a PostGIS function ST_SetSRID to specify the SRID.

Second, I created a modified "osm2pgrouting" that should work with pgRouting 2.0. It's (same as pgRouting) in the develop branch of its Github repository and will remain there until pgRouting 2.0 stable will be released.

I never tried osm2pgsql and later split the ways as described in the blog post, so I don't know how well this works. There is another tool named osm2po, which can create you a valid road network for pgRouting.

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.