Creating graph for pgRouting with PostGIS?

1k Views Asked by At

Let the line A (0.98,0.562,3.27536,5.9723) and line B (3.33221,5.899287,10.7656,9.653627). Does pgrouting take a point near (3.27536,5.9723) or (3.33221,5.899287) as a node? Really theses two points are just one, they have only a little error range.

1

There are 1 best solutions below

1
On

When you build your graph

Creating graph for pgrouting

you need to specify a snapping range. This way the point that are really close will snapped into the same node..

 SELECT assign_vertex_id(table_name, snapping_range, geometry_column_name, edge_id_column_name);

example

SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid');