<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">OK, <br><br>In my case the linestrings I was constructing polygons from did not have aligned<br>start/end points (nodes), so I loaded them sequentially & snapped nodes to pre-existing ones, to generate faces in the topology.<br><br>I did not use a topogeometry column at all, but extracted the topology faces into a standard Postgis geometry (polygon) column.<br><br>So possibly of no use to you, I'm afraid<br><br>Cheers,<br><br> Brent<br><br><br>--- On <b>Mon, 5/14/12, Luca Morandini <i><lmorandini@ieee.org></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Luca Morandini <lmorandini@ieee.org><br>Subject: Re: [postgis-users] toTopoGeom performance tips<br>To: postgis-users@postgis.refractions.net<br>Date: Monday, May 14, 2012, 2:52 PM<br><br><div class="plainMail">On
05/14/2012 12:20 PM, Brent Wood wrote:<br>> Hi Luca,<br>> <br>> I have found it MUCH faster to throw a collection of linestrings at a topology<br>> (which has no snapping distance) than to add linestrings sequentially with a<br>> snapping distance applied to ensure polygon closure.<br>> <br>> If your data is originally polygons anyway, they are already properly closed. Have<br>> you tried doing the loading as a geometry collection instead of iteratively? Or is<br>> it loading the collection that is too slow?<br><br>I am not sure I understood you: I just threw the multipolygons at the topology in one go, without looping:<br><br>CREATE TABLE testpolytopo(gid serial primary key, ogc_fid INTEGER);<br>SELECT topology.AddTopoGeometryColumn('testpolytopo', 'public', 'testpolytopo', 'topo', 'MULTIPOLYGON') As new_layer_id;<br>INSERT INTO testpolytopo(ogc_fid, topo)<br> SELECT ogc_fid,
topology.toTopoGeom(wkb_geometry, 'testpolytopo', 1)<br> FROM lga06aaust;<br><br>(wkb_geometry column of lga066aaust contains MultiPpygons).<br><br>Regards,<br><br>Luca Morandini<br>Data Architect - AURIN project<br>Department of Computing and Information Systems<br>University of Melbourne<br><br>-- Regards,<br><br>Luca Morandini<br>Data Architect - AURIN project<br>Department of Computing and Information Systems<br>University of Melbourne<br><br>_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="/mc/compose?to=postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></blockquote></td></tr></table>