<div dir="ltr">Hi Regina,<div><br></div><div>Thanks for your quick response! I upgraded to 2.2.2 using stack builder with the following results:</div><div><br></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.2,pgrouting-2.2.2,544044b,master,1.59.0)</font></div><div><font face="monospace, monospace" size="1">(1 row)</font></div></div><div><br></div><div><br></div><div>But unfortunately the same commands still produce the same results.</div><div><br></div><div>Huanchun</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 May 2016 at 22:24, <span dir="ltr"><<a href="mailto:pgrouting-users-request@lists.osgeo.org" target="_blank">pgrouting-users-request@lists.osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Send Pgrouting-users mailing list submissions to<br>
<a href="mailto:pgrouting-users@lists.osgeo.org">pgrouting-users@lists.osgeo.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<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>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:pgrouting-users-request@lists.osgeo.org">pgrouting-users-request@lists.osgeo.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:pgrouting-users-owner@lists.osgeo.org">pgrouting-users-owner@lists.osgeo.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Pgrouting-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Problem with topology using sample data in the manual<br>
(Regina Obe)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 14 May 2016 00:24:18 -0400<br>
From: "Regina Obe" <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>><br>
To: "'pgRouting users mailing list'" <<a href="mailto:pgrouting-users@lists.osgeo.org">pgrouting-users@lists.osgeo.org</a>><br>
Subject: Re: [pgrouting-users] Problem with topology using sample data<br>
in the manual<br>
Message-ID: <000001d1ad98$7b662120$72326360$@<a href="http://pcorp.us" rel="noreferrer" target="_blank">pcorp.us</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Quick note.<br>
<br>
<br>
<br>
There were some issues in pgRouting 2.2.0 released which this may be one of them. I pushed up pgRouting 2.2.2 in stackbuilder last week for PostgreSQL 9.5 x windows 64-bit<br>
<br>
<br>
<br>
If you reinstall PostGIS bundle from stackbuilder and then do a<br>
<br>
<br>
<br>
ALTER EXTENSION pgRouting UPDATE;<br>
<br>
<br>
<br>
You should get the new version.<br>
<br>
<br>
<br>
For others on windows, sorry haven't had a chance to repackage. I do have binaries you can get from here - <a href="http://postgis.net/windows_downloads/" rel="noreferrer" target="_blank">http://postgis.net/windows_downloads/</a><br>
<br>
<br>
<br>
In the unreleased section – look for in respective pg version folder<br>
<br>
<br>
<br>
pgrouting-pg95-binaries-2.2.2w64gcc48.zip <<a href="http://winnie.postgis.net/download/windows/pg95/buildbot/pgrouting-pg95-binaries-2.2.2w64gcc48.zip" rel="noreferrer" target="_blank">http://winnie.postgis.net/download/windows/pg95/buildbot/pgrouting-pg95-binaries-2.2.2w64gcc48.zip</a>><br>
<br>
<br>
<br>
<br>
<br>
Where the 95, w64 will change depending on which version of PostgreSQL you are running.<br>
<br>
<br>
<br>
These will be the same versions I'll be pushing up.<br>
<br>
<br>
<br>
<br>
<br>
Thanks,<br>
<br>
Regina<br>
<br>
From: Pgrouting-users [mailto:<a href="mailto:pgrouting-users-bounces@lists.osgeo.org">pgrouting-users-bounces@lists.osgeo.org</a>] On Behalf Of HuanChun Ye<br>
Sent: Friday, May 13, 2016 11:57 PM<br>
To: <a href="mailto:pgrouting-users@lists.osgeo.org">pgrouting-users@lists.osgeo.org</a><br>
Subject: [pgrouting-users] Problem with topology using sample data in the manual<br>
<br>
<br>
<br>
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:<br>
<br>
<br>
<br>
pgr_sample=# select * from edge_table;<br>
<br>
id | dir | source | target | cost | reverse_cost | x1 | y1 | x2 | y2 | the_geom<br>
<br>
<br>
<br>
----+-----+--------+--------+------+--------------+-----+-----+----------------+-----+-----------------------------------------------------------------------------------<br>
<br>
-<br>
<br>
1 | B | | | 1 | 1 | 2 | 0 | 2 | 1 | 010200000002000000000000000000004000000000000000000000000000000040000000000000F03F<br>
<br>
2 | TF | | | -1 | 1 | 2 | 1 | 3 | 1 | 0102000000020000000000000000000040000000000000F03F0000000000000840000000000000F03F<br>
<br>
3 | TF | | | -1 | 1 | 3 | 1 | 4 | 1 | 0102000000020000000000000000000840000000000000F03F0000000000001040000000000000F03F<br>
<br>
4 | B | | | 1 | 1 | 2 | 1 | 2 | 2 | 0102000000020000000000000000000040000000000000F03F00000000000000400000000000000040<br>
<br>
5 | FT | | | 1 | -1 | 3 | 1 | 3 | 2 | 0102000000020000000000000000000840000000000000F03F00000000000008400000000000000040<br>
<br>
6 | B | | | 1 | 1 | 0 | 2 | 1 | 2 | 01020000000200000000000000000000000000000000000040000000000000F03F0000000000000040<br>
<br>
7 | B | | | 1 | 1 | 1 | 2 | 2 | 2 | 010200000002000000000000000000F03F000000000000004000000000000000400000000000000040<br>
<br>
8 | B | | | 1 | 1 | 2 | 2 | 3 | 2 | 0102000000020000000000000000000040000000000000004000000000000008400000000000000040<br>
<br>
9 | B | | | 1 | 1 | 3 | 2 | 4 | 2 | 0102000000020000000000000000000840000000000000004000000000000010400000000000000040<br>
<br>
10 | B | | | 1 | 1 | 2 | 2 | 2 | 3 | 0102000000020000000000000000000040000000000000004000000000000000400000000000000840<br>
<br>
11 | FT | | | 1 | -1 | 3 | 2 | 3 | 3 | 0102000000020000000000000000000840000000000000004000000000000008400000000000000840<br>
<br>
12 | FT | | | 1 | -1 | 2 | 3 | 3 | 3 | 0102000000020000000000000000000040000000000000084000000000000008400000000000000840<br>
<br>
13 | FT | | | 1 | -1 | 3 | 3 | 4 | 3 | 0102000000020000000000000000000840000000000000084000000000000010400000000000000840<br>
<br>
14 | B | | | 1 | 1 | 2 | 3 | 2 | 4 | 0102000000020000000000000000000040000000000000084000000000000000400000000000001040<br>
<br>
15 | B | | | 1 | 1 | 4 | 2 | 4 | 3 | 0102000000020000000000000000001040000000000000004000000000000010400000000000000840<br>
<br>
16 | B | | | 1 | 1 | 4 | 1 | 4 | 2 | 0102000000020000000000000000001040000000000000F03F00000000000010400000000000000040<br>
<br>
17 | B | | | 1 | 1 | 0.5 | 3.5 | 1.999999999999 | 3.5 | 010200000002000000000000000000E03F0000000000000C4068EEFFFFFFFFFF3F0000000000000C40<br>
<br>
18 | B | | | 1 | 1 | 3.5 | 2.3 | 3.5 | 4 | 0102000000020000000000000000000C4066666666666602400000000000000C400000000000001040<br>
<br>
(18 rows)<br>
<br>
<br>
<br>
<br>
<br>
pgr_sample=# select pgr_createTopology('edge_table', 0.001);<br>
<br>
NOTICE: PROCESSING:<br>
<br>
NOTICE: pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)<br>
<br>
NOTICE: Performing checks, please wait .....<br>
<br>
NOTICE: Creating Topology, Please wait...<br>
<br>
NOTICE: -------------> TOPOLOGY CREATED FOR 18 edges<br>
<br>
NOTICE: Rows with NULL geometry or NULL id: 0<br>
<br>
NOTICE: Vertices table for table public.edge_table is: public.edge_table_vertices_pgr<br>
<br>
NOTICE: ----------------------------------------------<br>
<br>
pgr_createtopology<br>
<br>
--------------------<br>
<br>
OK<br>
<br>
(1 row)<br>
<br>
<br>
<br>
<br>
<br>
pgr_sample=# select pgr_analyzeGraph('edge_table', 0.001);<br>
<br>
NOTICE: PROCESSING:<br>
<br>
NOTICE: pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')<br>
<br>
NOTICE: Performing checks, please wait ...<br>
<br>
NOTICE: Analyzing for dead ends. Please wait...<br>
<br>
NOTICE: Analyzing for gaps. Please wait...<br>
<br>
NOTICE: Analyzing for isolated edges. Please wait...<br>
<br>
NOTICE: Analyzing for ring geometries. Please wait...<br>
<br>
NOTICE: Analyzing for intersections. Please wait...<br>
<br>
NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES:<br>
<br>
NOTICE: Isolated segments: 2<br>
<br>
NOTICE: Dead ends: 7<br>
<br>
NOTICE: Potential gaps found near dead ends: 1<br>
<br>
NOTICE: Intersections detected: 1<br>
<br>
NOTICE: Ring geometries: 0<br>
<br>
pgr_analyzegraph<br>
<br>
------------------<br>
<br>
OK<br>
<br>
(1 row)<br>
<br>
<br>
<br>
<br>
<br>
pgr_sample=# select pgr_nodeNetwork('edge_table', 0.001);<br>
<br>
NOTICE: PROCESSING:<br>
<br>
NOTICE: pgr_nodeNetwork('edge_table', 0.001, 'id', 'the_geom', 'noded', '<NULL>', f)<br>
<br>
NOTICE: Performing checks, please wait .....<br>
<br>
NOTICE: Processing, please wait .....<br>
<br>
NOTICE: Splitted Edges: 2<br>
<br>
NOTICE: Untouched Edges: 16<br>
<br>
NOTICE: Total original Edges: 18<br>
<br>
NOTICE: Edges generated: 4<br>
<br>
NOTICE: Untouched Edges: 16<br>
<br>
NOTICE: Total New segments: 20<br>
<br>
NOTICE: New Table: public.edge_table_noded<br>
<br>
NOTICE: ----------------------------------<br>
<br>
pgr_nodenetwork<br>
<br>
-----------------<br>
<br>
OK<br>
<br>
(1 row)<br>
<br>
<br>
<br>
<br>
<br>
pgr_sample=# select pgr_createTopology('edge_table_noded', 0.001);<br>
<br>
NOTICE: PROCESSING:<br>
<br>
NOTICE: pgr_createTopology('edge_table_noded', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)<br>
<br>
NOTICE: Performing checks, please wait .....<br>
<br>
NOTICE: Creating Topology, Please wait...<br>
<br>
NOTICE: -------------> TOPOLOGY CREATED FOR 20 edges<br>
<br>
NOTICE: Rows with NULL geometry or NULL id: 0<br>
<br>
NOTICE: Vertices table for table public.edge_table_noded is: public.edge_table_noded_vertices_pgr<br>
<br>
NOTICE: ----------------------------------------------<br>
<br>
pgr_createtopology<br>
<br>
--------------------<br>
<br>
OK<br>
<br>
(1 row)<br>
<br>
<br>
<br>
<br>
<br>
pgr_sample=# select pgr_analyzeGraph('edge_table_noded', 0.001);<br>
<br>
NOTICE: PROCESSING:<br>
<br>
NOTICE: pgr_analyzeGraph('edge_table_noded',0.001,'the_geom','id','source','target','true')<br>
<br>
NOTICE: Performing checks, please wait ...<br>
<br>
NOTICE: Analyzing for dead ends. Please wait...<br>
<br>
NOTICE: Analyzing for gaps. Please wait...<br>
<br>
NOTICE: Analyzing for isolated edges. Please wait...<br>
<br>
NOTICE: Analyzing for ring geometries. Please wait...<br>
<br>
NOTICE: Analyzing for intersections. Please wait...<br>
<br>
NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES:<br>
<br>
NOTICE: Isolated segments: 1<br>
<br>
NOTICE: Dead ends: 7<br>
<br>
NOTICE: Potential gaps found near dead ends: 1<br>
<br>
NOTICE: Intersections detected: 0<br>
<br>
NOTICE: Ring geometries: 0<br>
<br>
pgr_analyzegraph<br>
<br>
------------------<br>
<br>
OK<br>
<br>
(1 row)<br>
<br>
<br>
<br>
<br>
<br>
pgr_sample=# SELECT a.*<br>
<br>
pgr_sample-# FROM edge_table_noded a, edge_table_noded_vertices_pgr b, edge_table_noded_vertices_pgr c<br>
<br>
pgr_sample-# WHERE a.source=<a href="http://b.id" rel="noreferrer" target="_blank">b.id</a> <<a href="http://b.id" rel="noreferrer" target="_blank">http://b.id</a>> AND b.cnt=1 AND a.target=<a href="http://c.id" rel="noreferrer" target="_blank">c.id</a> <<a href="http://c.id" rel="noreferrer" target="_blank">http://c.id</a>> AND c.cnt=1;<br>
<br>
id | old_id | sub_id | source | target | the_geom<br>
<br>
----+--------+--------+--------+--------+------------------------------------------------------------------------------------<br>
<br>
20 | 17 | 1 | 17 | 18 | 010200000002000000000000000000E03F0000000000000C4068EEFFFFFFFFFF3F0000000000000C40<br>
<br>
(1 row)<br>
<br>
<br>
<br>
<br>
<br>
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:<br>
<br>
<br>
<br>
SELECT pgr_analyzegraph('edge_table_noded', 0.001);<br>
NOTICE: PROCESSING:<br>
NOTICE: pgr_analyzeGraph('edge_table_noded',0.001,'the_geom','id','source','target','true')<br>
NOTICE: Performing checks, pelase wait...<br>
NOTICE: Analyzing for dead ends. Please wait...<br>
NOTICE: Analyzing for gaps. Please wait...<br>
NOTICE: Analyzing for isolated edges. Please wait...<br>
NOTICE: Analyzing for ring geometries. Please wait...<br>
NOTICE: Analyzing for intersections. Please wait...<br>
NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES:<br>
NOTICE: Isolated segments: 0<br>
NOTICE: Dead ends: 6<br>
NOTICE: Potential gaps found near dead ends: 0<br>
NOTICE: Intersections detected: 0<br>
NOTICE: Ring geometries: 0<br>
pgr_createtopology<br>
--------------------<br>
OK<br>
(1 row)<br>
<br>
I tried the following but none helped:<br>
<br>
- increasing the value of tolerance up to 0.5<br>
<br>
- setting the SRID of the geometry column<br>
<br>
- converting data to .osm file and run osm2pgrouting<br>
<br>
<br>
<br>
I am using the following versions on Windows 10 64-bit PC:<br>
<br>
<br>
<br>
pgr_sample=# select version(), postgis_full_version(), pgr_version();<br>
<br>
version | postgis_full_version<br>
<br>
| pgr_version<br>
<br>
-------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------<br>
<br>
--------------------------------------------------------+-----------------------------------------------<br>
<br>
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<br>
<br>
leased 2016/01/26" LIBXML="2.7.8" LIBJSON="0.12" RASTER | (2.2.0,pgrouting-2.2.0,afc622e,master,1.59.0)<br>
<br>
(1 row)<br>
<br>
<br>
<br>
Thanks in advance for your help!<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20160514/0d095906/attachment.html" rel="noreferrer" target="_blank">http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20160514/0d095906/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<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>
<br>
------------------------------<br>
<br>
End of Pgrouting-users Digest, Vol 92, Issue 2<br>
**********************************************<br>
</blockquote></div><br></div></div>