[pgrouting-users] (SOLVED) TRSP returns "Start id was not found"
fl_v at inbox.ru
Fri Mar 7 02:45:07 PST 2014
As written in the documentation for SQL statement of TRSP:
id: int4 identifier of the edge
But pgr_createTopology function creates new "noded" table with "id" of bigint type.
I've solved this problem by casting "id" to integer type.
Now that's works:
SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_trsp('SELECT id::integer,source::integer,target::integer,cost::float FROM edge_tab', 138, 0.5, 161, 0.5, false, false);
Thanks very much to author of this post for idea.
>I try to use TRSP with source_edge/target_edge syntax:
>SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_trsp('SELECT id,source::integer,target::integer,cost::float FROM edge_tab', 138, 0.5, 161, 0.5, false, false);
>but the error "Start id was not found" occurs.
>Edges with ids 138 and 161 exists in edge_tab that's checked by
>SELECT * FROM edge_tab WHERE id in (138,161)
>Please could you tell me what's wrong ?
>Pgrouting-users mailing list
>Pgrouting-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pgrouting-users