<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Can you give me the link of the documentation that you are following?<br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">So that I can follow it.<br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Vicky<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 13, 2016 at 10:56 PM, HuanChun Ye <span dir="ltr"><<a href="mailto:huanchunye@athentek.com" target="_blank">huanchunye@athentek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am working through the examples in the manual (v2.2) using the sample data, but encountered a problem with topology, as described below. I apologize for the verbosity, but I want to show the exact steps leading to the problem, starting with just after importing the sample data:<div><br></div><div><div><font face="monospace, monospace" size="1">pgr_sample=# select * from edge_table;</font></div><div><font face="monospace, monospace" size="1"> id | dir | source | target | cost | reverse_cost | x1  | y1  |       x2       | y2  |                                      the_geom</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1">----+-----+--------+--------+------+--------------+-----+-----+----------------+-----+-----------------------------------------------------------------------------------</font></div><div><font face="monospace, monospace" size="1">-</font></div><div><font face="monospace, monospace" size="1">  1 | B   |        |        |    1 |            1 |   2 |   0 |              2 |   1 | 010200000002000000000000000000004000000000000000000000000000000040000000000000F03F</font></div><div><font face="monospace, monospace" size="1">  2 | TF  |        |        |   -1 |            1 |   2 |   1 |              3 |   1 | 0102000000020000000000000000000040000000000000F03F0000000000000840000000000000F03F</font></div><div><font face="monospace, monospace" size="1">  3 | TF  |        |        |   -1 |            1 |   3 |   1 |              4 |   1 | 0102000000020000000000000000000840000000000000F03F0000000000001040000000000000F03F</font></div><div><font face="monospace, monospace" size="1">  4 | B   |        |        |    1 |            1 |   2 |   1 |              2 |   2 | 0102000000020000000000000000000040000000000000F03F00000000000000400000000000000040</font></div><div><font face="monospace, monospace" size="1">  5 | FT  |        |        |    1 |           -1 |   3 |   1 |              3 |   2 | 0102000000020000000000000000000840000000000000F03F00000000000008400000000000000040</font></div><div><font face="monospace, monospace" size="1">  6 | B   |        |        |    1 |            1 |   0 |   2 |              1 |   2 | 01020000000200000000000000000000000000000000000040000000000000F03F0000000000000040</font></div><div><font face="monospace, monospace" size="1">  7 | B   |        |        |    1 |            1 |   1 |   2 |              2 |   2 | 010200000002000000000000000000F03F000000000000004000000000000000400000000000000040</font></div><div><font face="monospace, monospace" size="1">  8 | B   |        |        |    1 |            1 |   2 |   2 |              3 |   2 | 0102000000020000000000000000000040000000000000004000000000000008400000000000000040</font></div><div><font face="monospace, monospace" size="1">  9 | B   |        |        |    1 |            1 |   3 |   2 |              4 |   2 | 0102000000020000000000000000000840000000000000004000000000000010400000000000000040</font></div><div><font face="monospace, monospace" size="1"> 10 | B   |        |        |    1 |            1 |   2 |   2 |              2 |   3 | 0102000000020000000000000000000040000000000000004000000000000000400000000000000840</font></div><div><font face="monospace, monospace" size="1"> 11 | FT  |        |        |    1 |           -1 |   3 |   2 |              3 |   3 | 0102000000020000000000000000000840000000000000004000000000000008400000000000000840</font></div><div><font face="monospace, monospace" size="1"> 12 | FT  |        |        |    1 |           -1 |   2 |   3 |              3 |   3 | 0102000000020000000000000000000040000000000000084000000000000008400000000000000840</font></div><div><font face="monospace, monospace" size="1"> 13 | FT  |        |        |    1 |           -1 |   3 |   3 |              4 |   3 | 0102000000020000000000000000000840000000000000084000000000000010400000000000000840</font></div><div><font face="monospace, monospace" size="1"> 14 | B   |        |        |    1 |            1 |   2 |   3 |              2 |   4 | 0102000000020000000000000000000040000000000000084000000000000000400000000000001040</font></div><div><font face="monospace, monospace" size="1"> 15 | B   |        |        |    1 |            1 |   4 |   2 |              4 |   3 | 0102000000020000000000000000001040000000000000004000000000000010400000000000000840</font></div><div><font face="monospace, monospace" size="1"> 16 | B   |        |        |    1 |            1 |   4 |   1 |              4 |   2 | 0102000000020000000000000000001040000000000000F03F00000000000010400000000000000040</font></div><div><font face="monospace, monospace" size="1"> 17 | B   |        |        |    1 |            1 | 0.5 | 3.5 | 1.999999999999 | 3.5 | 010200000002000000000000000000E03F0000000000000C4068EEFFFFFFFFFF3F0000000000000C40</font></div><div><font face="monospace, monospace" size="1"> 18 | B   |        |        |    1 |            1 | 3.5 | 2.3 |            3.5 |   4 | 0102000000020000000000000000000C4066666666666602400000000000000C400000000000001040</font></div><div><font face="monospace, monospace" size="1">(18 rows)</font></div><div><br></div><div><br></div><div><font face="monospace, monospace" size="1">pgr_sample=# select pgr_createTopology('edge_table', 0.001);</font></div><div><font face="monospace, monospace" size="1">NOTICE:  PROCESSING:</font></div><div><font face="monospace, monospace" size="1">NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Performing checks, please wait .....</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Creating Topology, Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Rows with NULL geometry or NULL id: 0</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr</font></div><div><font face="monospace, monospace" size="1">NOTICE:  ----------------------------------------------</font></div><div><font face="monospace, monospace" size="1"> pgr_createtopology</font></div><div><font face="monospace, monospace" size="1">--------------------</font></div><div><font face="monospace, monospace" size="1"> OK</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1">pgr_sample=# select pgr_analyzeGraph('edge_table', 0.001);</font></div><div><font face="monospace, monospace" size="1">NOTICE:  PROCESSING:</font></div><div><font face="monospace, monospace" size="1">NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Performing checks, please wait ...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for dead ends. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for gaps. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for isolated edges. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for ring geometries. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for intersections. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:</font></div><div><font face="monospace, monospace" size="1">NOTICE:                    Isolated segments: 2</font></div><div><font face="monospace, monospace" size="1">NOTICE:                            Dead ends: 7</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Potential gaps found near dead ends: 1</font></div><div><font face="monospace, monospace" size="1">NOTICE:               Intersections detected: 1</font></div><div><font face="monospace, monospace" size="1">NOTICE:                      Ring geometries: 0</font></div><div><font face="monospace, monospace" size="1"> pgr_analyzegraph</font></div><div><font face="monospace, monospace" size="1">------------------</font></div><div><font face="monospace, monospace" size="1"> OK</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1">pgr_sample=# select pgr_nodeNetwork('edge_table', 0.001);</font></div><div><font face="monospace, monospace" size="1">NOTICE:  PROCESSING:</font></div><div><font face="monospace, monospace" size="1">NOTICE:  pgr_nodeNetwork('edge_table', 0.001, 'id', 'the_geom', 'noded', '<NULL>',  f)</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Performing checks, please wait .....</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Processing, please wait .....</font></div><div><font face="monospace, monospace" size="1">NOTICE:    Splitted Edges: 2</font></div><div><font face="monospace, monospace" size="1">NOTICE:   Untouched Edges: 16</font></div><div><font face="monospace, monospace" size="1">NOTICE:       Total original Edges: 18</font></div><div><font face="monospace, monospace" size="1">NOTICE:   Edges generated: 4</font></div><div><font face="monospace, monospace" size="1">NOTICE:   Untouched Edges: 16</font></div><div><font face="monospace, monospace" size="1">NOTICE:         Total New segments: 20</font></div><div><font face="monospace, monospace" size="1">NOTICE:   New Table: public.edge_table_noded</font></div><div><font face="monospace, monospace" size="1">NOTICE:  ----------------------------------</font></div><div><font face="monospace, monospace" size="1"> pgr_nodenetwork</font></div><div><font face="monospace, monospace" size="1">-----------------</font></div><div><font face="monospace, monospace" size="1"> OK</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1">pgr_sample=# select pgr_createTopology('edge_table_noded', 0.001);</font></div><div><font face="monospace, monospace" size="1">NOTICE:  PROCESSING:</font></div><div><font face="monospace, monospace" size="1">NOTICE:  pgr_createTopology('edge_table_noded', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Performing checks, please wait .....</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Creating Topology, Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  -------------> TOPOLOGY CREATED FOR  20 edges</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Rows with NULL geometry or NULL id: 0</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Vertices table for table public.edge_table_noded is: public.edge_table_noded_vertices_pgr</font></div><div><font face="monospace, monospace" size="1">NOTICE:  ----------------------------------------------</font></div><div><font face="monospace, monospace" size="1"> pgr_createtopology</font></div><div><font face="monospace, monospace" size="1">--------------------</font></div><div><font face="monospace, monospace" size="1"> OK</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1">pgr_sample=# select pgr_analyzeGraph('edge_table_noded', 0.001);</font></div><div><font face="monospace, monospace" size="1">NOTICE:  PROCESSING:</font></div><div><font face="monospace, monospace" size="1">NOTICE:  pgr_analyzeGraph('edge_table_noded',0.001,'the_geom','id','source','target','true')</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Performing checks, please wait ...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for dead ends. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for gaps. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for isolated edges. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for ring geometries. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Analyzing for intersections. Please wait...</font></div><div><font face="monospace, monospace" size="1">NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:</font></div><div><font face="monospace, monospace" size="1">NOTICE:                    Isolated segments: 1</font></div><div><font face="monospace, monospace" size="1">NOTICE:                            Dead ends: 7</font></div><div><font face="monospace, monospace" size="1">NOTICE:  Potential gaps found near dead ends: 1</font></div><div><font face="monospace, monospace" size="1">NOTICE:               Intersections detected: 0</font></div><div><font face="monospace, monospace" size="1">NOTICE:                      Ring geometries: 0</font></div><div><font face="monospace, monospace" size="1"> pgr_analyzegraph</font></div><div><font face="monospace, monospace" size="1">------------------</font></div><div><font face="monospace, monospace" size="1"> OK</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="monospace, monospace" size="1">pgr_sample=# SELECT a.*</font></div><div><font face="monospace, monospace" size="1">pgr_sample-# FROM edge_table_noded a, edge_table_noded_vertices_pgr b, edge_table_noded_vertices_pgr c</font></div><div><font face="monospace, monospace" size="1">pgr_sample-# WHERE a.source=<a href="http://b.id" target="_blank">b.id</a> AND b.cnt=1 AND a.target=<a href="http://c.id" target="_blank">c.id</a> AND c.cnt=1;</font></div><div><font face="monospace, monospace" size="1"> id | old_id | sub_id | source | target |                                      the_geom</font></div><div><font face="monospace, monospace" size="1">----+--------+--------+--------+--------+------------------------------------------------------------------------------------</font></div><div><font face="monospace, monospace" size="1"> 20 |     17 |      1 |     17 |     18 | 010200000002000000000000000000E03F0000000000000C4068EEFFFFFFFFFF3F0000000000000C40</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div><div><br></div><div><br></div><div>So the original node id 17, which is a nearly touching T-intersection, remains isolated. This is in contrast to the output shown in the manual, which shows the following:</div></div><div><br></div><div><pre style="border:thin dotted rgb(12,55,98);margin-top:0px;margin-bottom:12px;padding:0.8em;color:rgb(51,51,51);background-color:rgb(240,240,240)"><span style="color:rgb(0,112,32);font-weight:bold">SELECT</span> <span>pgr_analyzegraph</span><span>(</span><span style="color:rgb(64,112,160)">'edge_table_noded'</span><span>,</span> <span style="color:rgb(32,128,80)">0</span><span>.</span><span style="color:rgb(32,128,80)">001</span><span>);</span>
<span>NOTICE</span><span>:</span>  <span>PROCESSING</span><span>:</span>
<span>NOTICE</span><span>:</span>  <span>pgr_analyzeGraph</span><span>(</span><span style="color:rgb(64,112,160)">'edge_table_noded'</span><span>,</span><span style="color:rgb(32,128,80)">0</span><span>.</span><span style="color:rgb(32,128,80)">001</span><span>,</span><span style="color:rgb(64,112,160)">'the_geom'</span><span>,</span><span style="color:rgb(64,112,160)">'id'</span><span>,</span><span style="color:rgb(64,112,160)">'source'</span><span>,</span><span style="color:rgb(64,112,160)">'target'</span><span>,</span><span style="color:rgb(64,112,160)">'true'</span><span>)</span>
<span>NOTICE</span><span>:</span>  <span>Performing</span> <span>checks</span><span>,</span> <span>pelase</span> <span>wait</span><span>...</span>
<span>NOTICE</span><span>:</span>  <span>Analyzing</span> <span style="color:rgb(0,112,32);font-weight:bold">for</span> <span>dead</span> <span>ends</span><span>.</span> <span>Please</span> <span>wait</span><span>...</span>
<span>NOTICE</span><span>:</span>  <span>Analyzing</span> <span style="color:rgb(0,112,32);font-weight:bold">for</span> <span>gaps</span><span>.</span> <span>Please</span> <span>wait</span><span>...</span>
<span>NOTICE</span><span>:</span>  <span>Analyzing</span> <span style="color:rgb(0,112,32);font-weight:bold">for</span> <span>isolated</span> <span>edges</span><span>.</span> <span>Please</span> <span>wait</span><span>...</span>
<span>NOTICE</span><span>:</span>  <span>Analyzing</span> <span style="color:rgb(0,112,32);font-weight:bold">for</span> <span>ring</span> <span>geometries</span><span>.</span> <span>Please</span> <span>wait</span><span>...</span>
<span>NOTICE</span><span>:</span>  <span>Analyzing</span> <span style="color:rgb(0,112,32);font-weight:bold">for</span> <span>intersections</span><span>.</span> <span>Please</span> <span>wait</span><span>...</span>
<span>NOTICE</span><span>:</span>              <span>ANALYSIS</span> <span>RESULTS</span> <span style="color:rgb(0,112,32);font-weight:bold">FOR</span> <span>SELECTED</span> <span>EDGES</span><span>:</span>
<span>NOTICE</span><span>:</span>                    <span>Isolated</span> <span>segments</span><span>:</span> <span style="color:rgb(32,128,80)">0</span>
<span>NOTICE</span><span>:</span>                            <span>Dead</span> <span>ends</span><span>:</span> <span style="color:rgb(32,128,80)">6</span>
<span>NOTICE</span><span>:</span>  <span>Potential</span> <span>gaps</span> <span style="color:rgb(0,112,32);font-weight:bold">found</span> <span>near</span> <span>dead</span> <span>ends</span><span>:</span> <span style="color:rgb(32,128,80)">0</span>
<span>NOTICE</span><span>:</span>               <span>Intersections</span> <span>detected</span><span>:</span> <span style="color:rgb(32,128,80)">0</span>
<span>NOTICE</span><span>:</span>                      <span>Ring</span> <span>geometries</span><span>:</span> <span style="color:rgb(32,128,80)">0</span>
<span>pgr_createtopology</span>
<span style="color:rgb(64,128,144);font-style:italic">--------------------</span>
 <span>OK</span>
<span>(</span><span style="color:rgb(32,128,80)">1</span> <span style="color:rgb(0,112,32);font-weight:bold">row</span><span>)</span></pre></div><div>I tried the following but none helped:</div><div>- increasing the value of tolerance up to 0.5</div><div>- setting the SRID of the geometry column</div><div>- converting data to .osm file and run osm2pgrouting</div><div><br></div><div>I am using the following versions on Windows 10 64-bit PC:</div><div><br></div><div><div><font face="monospace, monospace" size="1">pgr_sample=# select version(), postgis_full_version(), pgr_version();</font></div><div><font face="monospace, monospace" size="1">                           version                           |                                                                       postgis_full_version</font></div><div><font face="monospace, monospace" size="1">                                                        |                  pgr_version</font></div><div><font face="monospace, monospace" size="1">-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------</font></div><div><font face="monospace, monospace" size="1">--------------------------------------------------------+-----------------------------------------------</font></div><div><font face="monospace, monospace" size="1"> PostgreSQL 9.5.2, compiled by Visual C++ build 1800, 64-bit | POSTGIS="2.2.2 r14797" GEOS="3.5.0-CAPI-1.9.0 r4090" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.0.2, re</font></div><div><font face="monospace, monospace" size="1">leased 2016/01/26" LIBXML="2.7.8" LIBJSON="0.12" RASTER | (2.2.0,pgrouting-2.2.0,afc622e,master,1.59.0)</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div></div><div><font face="monospace, monospace" size="1"><br></font></div><div><font face="arial, helvetica, sans-serif">Thanks in advance for your help!</font></div><div><br></div></div>
<br>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><pre>Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@<a href="http://georepublic.de" target="_blank">georepublic.de</a>
Web: <a href="https://georepublic.info" target="_blank">https://georepublic.info</a>

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

<span></span></pre></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>