Skip to content

Couple of bugs after pgr_nodeNetwork applying #240

@tezkz

Description

@tezkz

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

seqnodeedgecost
010120.29335
18100.2535
29-10

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

seqnodeedgecost
0101443565800.29335
181443563080.2535
29-10

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

seqnodeedgecost
0-1120.45335
17100.6521
2190

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions