<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Strk,</p>
<p>Yes - I will try that next - loading it in chunks. But wouldn't it miss out on some of the neighbourpolygons then if I use such subsets based on pkey?</p>
<p>Thanks,<br />Andreas</p>
<p>On 2016-07-13 12:55, Sandro Santilli wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">On Tue, Jul 12, 2016 at 01:15:41PM +0200, Neumann, Andreas wrote:
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi Sandro, <br /><br /> I let this function run during the night and after 7.5h I got an error<br /> message:</blockquote>
<br /> Eh, that's why I suggested loading the topology in batches.<br /><br /> Use constructs like:<br /><br /> SELECT TopoGeo_addPolygon(...)<br /> FROM input_table<br /> WHERE gid >= $1 AND gid < $2<br /><br /> With $1..$2 in a range that makes it run within a few minutes.<br /><br /> Or, alternatively, code the loop in plpgsql by intercepting<br /> exceptions and skipping the "offending" input to analyze later<br /> (but I like the multi-transaction approach better as it allows<br /> you to see the topology in QGIS while it's being loaded).<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">ERROR: Corrupted topology: adjacent edges 159972 and -159958 bind<br /> different face (0 and 78697)</blockquote>
<br /> It means that somehow the ST_CreateTopoGeo function in a given<br /> stage created a corrupted topology. This is usually due to some<br /> robustness issue. Snapping may help a little with this.<br /><br /> Once again, note that if this was being done in a loop you might<br /> have stopped and looked at the issue with QGIS, to continue after<br /> the topology validity was fixed.<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">I have to say that I did not tune Postgis memory-wise - maybe I should<br /> do that next. But the above error message probably doesn't indicate a<br /> memory problem, but a problem with the data.</blockquote>
<br /> Correct, it's not a problem with memory.<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">My data: 2582 polygons with a total of 167176 vertices.</blockquote>
<br /> Try loading it in chunks of 300 polygons<br /><br /> --strk;<br /><br /> () Free GIS & Flash consultant/developer<br /> /\ <a href="https://strk.kbt.io/services.html">https://strk.kbt.io/services.html</a></div>
</blockquote>
<p> </p>
<div> </div>
</body></html>