Open tssmits opened 3 years ago
I've started a branch on my fork, where I've added a first attempt at a test case that should cover this issue.
https://github.com/tssmits/pgrouting/pull/1
Still figuring out how to actually run the test, but I thought I'd already share what I have so far.
Thanks a lot! I tried to look through the function briefly, but it's quite a lot of code and it was contributed quite some time ago, so I'm not familiar with it. Eventually you have a not so common use case with your very long lines, which is not covered with pgRouting tests.
Feel free to ask on our chat if you have some question or want to discuss something. https://gitter.im/pgRouting/pgrouting
FYI This is a very problematic function as you can see from the lists of bugs Wrap your test case as follows, :
SELECT todo_start('issue 1882 needs to be fixed');
SELECT is((SELECT count(*)::INTEGER FROM ferry_lines), 4, 'we have 4 ferry_lines edges');
SELECT pgr_nodeNetwork('ferry_lines', 0.0001, 'id', 'the_geom');
SELECT is((SELECT count(*)::INTEGER FROM ferry_lines_noded), 15, 'Now we have 15 edges')
SELECT todo_end();
And make the PR if possible to both branches, master/main and develop. Soon we will change the name to "main". so use the branch name that you see.
Made a comment in https://github.com/tssmits/pgrouting/pull/2
Problem pgr_nodenetwork misses nodes on very long ferry lines imported from OSM.
To Reproduce Load the table
public.lines
from the sql in the Sample Data section.Execute
Expectation All points where the lines overlap should be noded. However, some are missing.
Multiple re-runs give the same missing nodes, so the failure seems to be at least stable over time.
With the results from this sample data, one is missing (in the middle, above the two overlapping nodes):
Sample Data
This was imported with
osm2pgsql
from the fileferries-problematic.osm.pbf
in this zip:ferries-problematic.zip
Platform/versions