<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div dir="ltr" style="color: rgb(33, 33, 33);">
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top: 0px; margin-bottom: 0px;">Hi everyone, <br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">I am using pgrouting on OpenStreetMap data and I want to node the network using the function "pgr_nodeNetwork function", however the nodes are not created correctly. I am importing a large set of data to PostgreSQL
in the following way:</p>
<p style="margin-top: 0px; margin-bottom: 0px;"> <br>
</p>
<div>BBOX="8.944,45.830, 9.441,46.323"</div>
<div>wget --progress=dot:mega -O "roads_osm_viaregina.osm" "http://www.overpass-api.de/api/xapi?*[bbox=${BBOX}][@meta]"<br>
</div>
<div><br>
</div>
<div>osm2pgrouting -file "/home/kilsedar/Desktop/DATA/roads_osm_viaregina.osm" \</div>
<div> -conf "/usr/share/osm2pgrouting/mapconfig.xml" \</div>
<div> -dbname pgrouting-viaregina \</div>
<div> -user postgres \<br>
</div>
<div> -host localhost \</div>
<div> -clean<br>
</div>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">At this point, if analyze the graph using pgr_analyzeGraph function by "<em>SELECT pgr_analyzegraph('ways', 0.001, 'the_geom', 'gid');</em>" the result I am getting is the following: <br>
</p>
<div>NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES:</div>
<div>NOTICE: Isolated segments: 86</div>
<div>NOTICE: Dead ends: 8172</div>
<div>NOTICE: Potential gaps found near dead ends: 7419</div>
<div>NOTICE: Intersections detected: <strong>1159</strong></div>
<div>NOTICE: Ring geometries: 12<br>
</div>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Later if I run <br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><em>"SELECT pgr_nodeNetwork('ways', 0.001, 'gid', 'the_geom');"</em><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><em>"SELECT pgr_createTopology(ways_noded, 0.001);"</em><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><em>"SELECT pgr_analyzegraph(ways_noded, 0.001</em></span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><em>)</em></span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><em>;"</em></span><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">I get the following result:</span></p>
<div>NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES:</div>
<div>NOTICE: Isolated segments: 5</div>
<div>NOTICE: Dead ends: 958</div>
<div>NOTICE: Potential gaps found near dead ends: 329</div>
<div>NOTICE: Intersections detected: <strong>5173</strong><br>
</div>
<div>NOTICE: Ring geometries: 12<br>
</div>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">As you can see, the number of intersections increased, instead of descreasing. </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">NOTE: Somehow, by playing with the tolerance parameter and setting it to "0.000045" I decreased the
number of intersections to 957, and the complete result is the following:</span></p>
<div>NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES:</div>
<div>NOTICE: Isolated segments: 58<br>
</div>
<div>NOTICE: Dead ends: 7851</div>
<div>NOTICE: Potential gaps found near dead ends: 68</div>
<div>NOTICE: Intersections detected: 957</div>
<div>NOTICE: Ring geometries: 12<br>
</div>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">In the attachment, I am sending a screenshot of the same data in QGIS, where the bounding box is "9.265,46.108,
9.276,46.118" and the tolerance parameter is "0.001". In this screenshot you can see that in some intersections, nodes are not created. It is trivial to see that red nodes are the ones that are created after noding. </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Is it possible to identify the problem, or if the function is running correctly?</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Thank you,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Regards,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)">Candan Eylul Kilsedar</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px; background-color:rgb(255,255,255)"><br>
</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
</div>
</div>
</div>
</div>
</body>
</html>