Hey folks,

  I got pgdikstra installed but I'm having trouble creating the graph
tables. I imported a roads shapefile and set up the appropriate
columns:

shp2pgsql -D road_l.shp roads | psql -d routing
alter table roads add column source_id int4;
alter table roads add column target_id int4;
alter table roads add column edge_id int4;
update roads set edge_id = gid;
SELECT assign_vertex_id('roads', 0.1);

But when I create the graph tables, I get the following error:

SELECT create_graph_tables('roads', 'int4');
....
ERROR:  duplicate key violates unique constraint "roads_edges_source_key"
CONTEXT:  SQL statement "INSERT INTO roads_edges (id, source, target)
VALUES (23, '36', '37')"
PL/pgSQL function "create_graph_tables" line 27 at execute statement


Any ideas?

--
Matt Perry
[EMAIL PROTECTED]
http://www.perrygeo.net

_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to