[Cartoweb-dev] [Bug 1180] [pgdijkstra] Handle duplicates source, target entries in function assign_vertex_id ()

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Wed Oct 26 11:34:55 EDT 2005


http://bugzilla.maptools.org/show_bug.cgi?id=1180

sylvain.pasche at camptocamp.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|NEW                         |ASSIGNED
          Component|Install+Maintenance Scripts |Core
            Summary|pgdijktra post gis data?    |[pgdijkstra] Handle
                   |                            |duplicates source,target
                   |                            |entries in function
                   |                            |assign_vertex_id ()



------- Additional Comments From sylvain.pasche at camptocamp.com  2005-10-26 11:34 -------
Hello Walter,

The error you are having is related to the fact that you have non unique
(source, target) tuples in your prova_route_2 table after the assign_vertex_id
function call.

This is not related to the number of rows you have in your table.

One solution to this problem is to run the following SQL command before you call
the create_graph_tables() function:

(replace graph2 with the name of your table containing the duplicates

 # create table graph2_tmp as select * from graph2 where gid  in (select gid
from (select DISTINCT on (source_id, target_id) source_id, gid from graph2) as
doublon);
 # delete from graph2;
 # insert into graph2 (select * from graph2_tmp);

I hope this will help you. The enhancement would be to make the postgresql
function assign_vertex_id() more robust by deleting automatically the duplicate
entries for instance.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Cartoweb-dev mailing list