[pgrouting-users] PgRouting sew-devel-2_0 : topology problem
woodbri at swoodbridge.com
Mon Mar 18 08:04:14 PDT 2013
On 3/18/2013 10:48 AM, Frédéric Bonifas wrote:
> I have built PgRouting from the sew-devel-2_0 branch. I am using
> Postgis 2.0 and PostgreSql 9.1.8
> I have created a database "routing" and created the postgis and
> pgrouting extensions on it :
> createdb routing
> createlang plpgsql routing
You can use "CREATE EXTENSION plpgsql" but I'm not sure it is even needed.
> psql -d routing -c "CREATE EXTENSION postgis;"
> psql -d routing -c "CREATE EXTENSION pgrouting;"
> I did not run the following lines because I assume that "CREATE
> EXTENSION pgrouting;" does that but I may be wrong. Anyway, the
> /usr/share/postlbs/ directory is empty.
> psql -d routing -f /usr/share/postlbs/routing_core.sql
> psql -d routing -f /usr/share/postlbs/routing_core_wrappers.sql
> psql -d routing -f /usr/share/postlbs/routing_topology.sql
Right when you install an extension it loads all the files as part of
the extension. And I do not install files in /usr/share/postlbs The
extension installs share/postgresql/extension/pgrouting--1.0.7.sql which
contains all the SQL concatenated into one file.
One problem with the current setup is that tsp and dd are optional and
as a result probably need to be broken out into separate extensions, but
that should not be a problem for now.
> Then I run osm2pgrouting, from the georepublic ppa.
> osm2pgrouting -file "data.osm" -conf
> "/usr/share/osm2pgrouting/mapconfig.xml" -host localhost -dbname
> routing -user postgres -clean
> osm2pgrouting seems the end coorectly as I got :
> size of streets: 41
> size of splitted ways : 469
> But while the "nodes" table is correctly filled, the "ways" and
> "vertices_tmp" tables remain empty. I suspect this might be related to
> routing_core.sql, routing_core_wrappers.sql and routing_topology.sql
> that I did not run.
> Does someone know what I am doing wrong ?
A couple of thoughts here:
1. you have to run the topology command assign_vertex_id(), which I have
never used as I wrote my own a long time ago.
2. You might (most likely) will need to load legacy.sql from postgis
until I have had a chance to review, update and test all the sql code
for compatibility with postgis 2.x
Thank you for stepping on on the bleed edge and testing this. I look
forward to here about your success and failures. Hopefully more success
than failures :)
> Thanks in advance
More information about the Pgrouting-users