<div dir="ltr">Hi,<div><br></div><div>I have looked into the documentation, and it seems that there are two form of using toTopoGeom:</div><div>1. One to add new topogeometry an existing topology layer, and another to change an element. This is what you seem to be using.</div><div>2. The second form, with less arguments, is used ADD changes to existing topoGeometries. But, it says you may want to use clearTopoGeom(topo) to create a totally new shape.</div><div><br></div><div>My gut feeling is that since you already have the topogeometry in the topology, when you try to add it again, it will snap to the old geometry any way. </div><div>My first try would be something like:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">UPDATE lines_table<br></span><span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"></span><div style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">SET topo = topology.toTopoGeom(geom, clearTopoGeom(topo), 0.1)<br></div><div style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">WHERE id = 1263;</div></div><div><br></div><div><a href="http://postgis.net/docs/manual-dev/toTopoGeom.html">http://postgis.net/docs/manual-dev/toTopoGeom.html</a><br></div><div><br></div><div>Good luck,</div><div><br></div><div>Alexandre Neto</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 29, 2020 at 5:53 PM Alexandre Silva <<a href="mailto:amsilva@infoportugal.impresa.pt">amsilva@infoportugal.impresa.pt</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I have trying using the topology to correct some data with marginal errors and in some particular cases i'd like to use a higher snap tolerance than the defined in the topology.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
The topology has a tolerance of 0.01m (using a metric projection) and some lines need an higher tolerance of 0.1m to be fixed. Here's the code i used to create the topology and to fix the particular cases:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
SELECT topology.CreateTopology('a_topology', 3763, 0.01, true); <br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span>UPDATE lines_table<br>
</span>
<div>SET topo = topology.toTopoGeom(geom, 'a_topology', 1, 0.1)<span><br>
</span></div>
<div><span>WHERE id = 1263;</span></div>
<div><span><br>
</span></div>
<div><span>Even though the line is closer than 0.1m to another line, it isn't snapped. Am i thinking wrong here? Shouldn't the line be snapped? Which of the tolerances prevails?</span></div>
<div><span>If this is the expected behaviour is there a better way to do what i'm trying to do?</span></div>
<div><span></span><br>
</div>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks in advance,<br>
</div>
<div id="gmail-m_5023270528477521244Signature">
<div>

<div id="gmail-m_5023270528477521244divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px;margin-bottom:0px"><span id="gmail-m_5023270528477521244ms-rterangepaste-start"></span></p>
<table style="color:rgb(33,33,33);font-size:15px;width:430px" width="430">
<tbody>
<tr>
<td>Alexandre Silva<br>
</td>
<td><br>
</td>
<td><br>
</td>
<td><br>
</td>
</tr>
</tbody>
</table>
<br>
<p style="margin-top:0px;margin-bottom:0px"></p>
</div>
</div>
</div>
</div>
<img src="http://newsletter.impresapublishing.pt/i/barra_ip.jpg">
</div>

_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>