A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pgRouting/pgrouting/issues/240 below:

Couple of bugs after pgr_nodeNetwork applying · Issue #240 · pgRouting/pgrouting · GitHub

1)Need of casting "id::integer".
The pgr_nodeNetwork function creates new "noded" table with "id" of
bigint type, but SQL statement of many Routing Functions assumes "id" int4 type.
Casting "id::integer" helps to solve this bug.
For TRSP example:
a) source_node/target_node syntax -
SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_trsp('SELECT id::integer as id,source::integer,target::integer,cost::float FROM test', 10, 9, false, false);
returns normal edge ids

seq node edge cost 0 10 12 0.29335 1 8 10 0.2535 2 9 -1 0

but they contains strange values without casting of "id" to integer

seq node edge cost 0 10 144356580 0.29335 1 8 144356308 0.2535 2 9 -1 0

b) source_edge/target_edge syntax -
SELECT seq, id1 AS node, id2 AS edge, cost FROM pgr_trsp('SELECT id::integer,source::integer,target::integer,cost::float FROM test_noded', 12, 0.5, 9, 0.5, false, false);
returns normal result

seq node edge cost 0 -1 12 0.45335 1 7 10 0.6521 2 1 9 0

but error "Start id was not found" occurs without casting of "id" to integer

  1. The pgr_nodeNetwork creates a lot of EMPTY GEOMETRY in new "noded" table.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4