-
-
Notifications
You must be signed in to change notification settings - Fork 376
Closed
Labels
Description
Expected behavior and actual behavior
Using the function pgr_nodeNetwork
I found several issues. Two of them were already reported in #692 and #1074. The other one might be like #1009 but I can not see the pictures of this issue so I am not sure.
Anyway, my two test cases are the following:
test case 1:
test case 1 expected:
test case 1 result (both edges are cut in a weird manner):
test case 2 (the yellow edge is only one edge):
test case 2 expected (the former yellow edge is cut):
test case 2 result (both edges are cut in a weird manner):
Steps to reproduce the problem
CREATE TABLE original_hard (
id serial NOT NULL PRIMARY KEY
);
SELECT addgeometrycolumn('original_hard', 'the_geom', 2154, 'LINESTRING', 2);
INSERT INTO original_hard (the_geom)
VALUES ('SRID=2154;LineString (843731.96837530436459929 6520224.37815147917717695, 843720.94724064960610121 6520301.25479774083942175, 843720.39054300379939377 6520305.10738470777869225, 843720.05595255247317255 6520307.44336138013750315)');
INSERT INTO original_hard (the_geom)
VALUES ('SRID=2154;LineString (843681.62641362368594855 6520255.06193162966519594, 843726.45216981507837772 6520262.85580295417457819)');
INSERT INTO original_hard (the_geom)
VALUES ('SRID=2154;LineString (840244.02465303440112621 6519477.50229732040315866, 840223.44937284057959914 6519479.99790611304342747, 840211.45880026079248637 6519479.72390817571431398, 840199.53777986904606223 6519474.36406740732491016, 840190.58289291337132454 6519464.75101129896938801, 840181.41248250298667699 6519451.97837869636714458, 840170.42565293482039124 6519434.3100799722597003, 840168.55425586295314133 6519430.80164159927517176, 840151.01772376440931112 6519396.24404330458492041, 840139.96531795407645404 6519372.58710443042218685, 840138.63576878234744072 6519367.48039372358471155, 840146.19430478441063315 6519303.77102805394679308, 840150.080136300297454 6519274.91238123551011086, 840119.29845047416165471 6519150.59983278997242451, 840117.11253627086989582 6519135.32088061515241861, 840114.83395825664047152 6519129.54824385419487953, 840108.43866820889525115 6519120.18260038271546364, 840107.31546254467684776 6519117.61322824936360121, 840099.29079487535636872 6519102.64529608283191919)');
INSERT INTO original_hard (the_geom)
VALUES ('SRID=2154;LineString (840225.44422620115801692 6519369.90784595627337694, 840164.1949518381152302 6519407.88627272564917803, 840153.53890225966461003 6519408.40932532399892807, 840127.25395868462510407 6519400.12230102065950632, 840102.82493207952938974 6519361.2863945122808218, 840094.13878045929595828 6519332.39617275167256594)');
SELECT pgr_nodeNetwork('original_hard', 0.1, 'id', 'the_geom');
Specifications like the version of pgRouting/PostGIS and PostgreSQL as well as Operating System
SELECT version();
PostgreSQL 10.11 (Ubuntu 10.11-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit
SELECT postgis_full_version();
POSTGIS="2.4.4 r16526" PGSQL="100" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.3, released 2017/11/20" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" RASTER
SELECT pgr_version();
3.0.0-beta
I fixed this function and it seems to work on my cases and usual test cases so I will propose a related PR soon.
EDIT: I followed the steps to reproduce #1009 and it seems it is the same bug.