<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Steve,<br>
<br>
I transformed the geometries into a new table.<br>
From there I created a new topology using the new reference system
(25831)<br>
<br>
<div class="moz-cite-prefix">On 22/01/2015 16:35, Miller, Stephan
wrote:<br>
</div>
<blockquote
cite="mid:12B980F75E5A6645A04428CB007A615C8CE5A9F2@MLBMXUS21.cs.myharris.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
color:black;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Here is the
code as it now stands. I was using 4326 and topology will
not work for geography coordinates. Can you share your code
so that I can compare? I am trying to do an on-the-fly
transform to 32648 for each record in the line 26. Is that
how you approached this problem?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Steve<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><br>
</span><span style="color:#1F497D"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>toni hernández<br>
<b>Sent:</b> Thursday, January 22, 2015 10:14 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [postgis-users] Checking Road
Network Topology<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Steve,<br>
<br>
I had the same issue when working with geometries using
srid=4326 . I was also following the same link (<a
moz-do-not-send="true"
href="http://blog.mathieu-leplatre.info/use-postgis-topologies-to-clean-up-road-networks.html">http://blog.mathieu-leplatre.info/use-postgis-topologies-to-clean-up-road-networks.html</a>)<br>
Then I tried with some projected geometries (units = meters)
and the problem was gone. I am not sure why. Maybe it was just
a coincidence.
<br>
<br>
cheers.<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 20/01/2015 20:45, Miller, Stephan
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">All –<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am attempting to validate the topology
of a dense road network ( 1.2 Million roads) modeled after
<a moz-do-not-send="true"
href="http://blog.mathieu-leplatre.info/use-postgis-topologies-to-clean-up-road-networks.html%20from%20July%202013">http://blog.mathieu-leplatre.info/use-postgis-topologies-to-clean-up-road-networks.html
from July 2013</a>. The code is given below:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">-- HC_RoadTopologicalCheck<o:p></o:p></p>
<p class="MsoNormal">-- Drop the existing topology<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">SELECT
topology.DropTopology('roads_topo');<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">SELECT
topology.CreateTopology('roads_topo',4326, 0.000001, true);<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">SELECT
topology.AddTopoGeometryColumn('roads_topo', 'fgcm',
'transportationgroundcrv', 'topo_shape', 'LINESTRING');<o:p></o:p></p>
<p class="MsoNormal">--UPDATE transportationgroundcrv SET
topo_shape =
topology.toTopoGeom(transportationgroundcrv.shape,
'roads_topo', 1, 1.0);<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">-- Encapsulate the UPDATE inside code
that checks for errors<o:p></o:p></p>
<p class="MsoNormal">DO $$ DECLARE r record;<o:p></o:p></p>
<p class="MsoNormal">BEGIN<o:p></o:p></p>
<p class="MsoNormal"> FOR r IN SELECT * FROM
transportationgroundcrv loop<o:p></o:p></p>
<p class="MsoNormal"> BEGIN<o:p></o:p></p>
<p class="MsoNormal"> UPDATE
transportationgroundcrv SET topo_shape =
topology.toTopoGeom(transportationgroundcrv.shape,
'roads_topo', 1, 1.0)<o:p></o:p></p>
<p class="MsoNormal"> WHERE r.objectid =
r.objectid;<o:p></o:p></p>
<p class="MsoNormal"> EXCEPTION<o:p></o:p></p>
<p class="MsoNormal"> WHEN OTHERS THEN<o:p></o:p></p>
<p class="MsoNormal"> RAISE WARNING 'Loading of
record % failed: %', r.objectid, SQLERRM;<o:p></o:p></p>
<p class="MsoNormal"> END;<o:p></o:p></p>
<p class="MsoNormal"> END LOOP;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">END$$;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Select * from
ValidateTopology('roads_topo');<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am getting everything passing to the
exception statement and all the records are being flagged
with
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">WARNING: Loading of record 791456
failed: SQL/MM Spatial exception - curve not simple<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Intermittently, I am getting the
following error also.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">WARNING: Loading of record 792591
failed: Spatial exception - geometry intersects edge 69612<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Everything appears to be flagged as an
error; the ValidateTopology call returns nothing.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Any insights or suggestions would be
appreciated.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Steve<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>postgis-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif""><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
</body>
</html>