Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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