<div dir="ltr"><div><div>Tks Strk, <br></div>I think I got it. <br><br>Actually the correct sector_code - face pair is     '290390405000036' : 23157<br></div>So the correct code is: <br><div><div><div><br>UPDATE temp_geom_bahia2 SET tg_geom_dump_utm = CreateTopoGeom('topo_bahia',3,1,'{{23157,3}}'::topology.topoelementarray)<br>WHERE cod_setor = '290390405000036'<br><br></div><div>I'll try to migrate all this knowledge to the wiki<br></div><div><br><br><br><div class="gmail_extra"><br><div class="gmail_quote">2016-02-26 8:03 GMT-03:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Thu, Feb 25, 2016 at 09:15:32PM +0000, Lucas Ferreira Mation wrote:<br>
<br>
> 2) In most test I did, I got an error when uploading one or two polygons<br>
> (out of a 900 polygons in Acre state). How can I add these afterward?<br>
> Assume all neighbor polygons have been added to the topogeometry. Thus the<br>
> topology already includes a face that would be the equivalente of one of<br>
> the error polygons. Let's that I see in QGIS that polygon A correspond to<br>
> face 13 of the topogeometry. Can I insert this by "brute force", by editing<br>
> the text the corresponding cell of the topogeometry column?<br>
><br>
> So I found out sector code '290390405000036' (in the original dataset ids)<br>
> corresponds to face 13314 of the topogeometry. And I tried to insert this<br>
> by "brute" force:<br>
> UPDATE temp_geom_bahia2 SET tg_geom_dump_utm = '(28,1,13314,3)' WHERE<br>
> cod_setor = '290390405000036'<br>
<br>
</span>That's not the way to do it, you need to use CreateTopoGeom:<br>
<a href="http://postgis.net/docs/manual-dev/CreateTopoGeom.html" rel="noreferrer" target="_blank">http://postgis.net/docs/manual-dev/CreateTopoGeom.html</a><br>
<br>
Never ever use a literal value for a TopoGeometry unless you are<br>
repairing some corrupted database. Those numbers are not references<br>
to primitives but to TopoGeometry identifiers in the topology's<br>
"relation" table, which contains the actual references to objects.<br>
<span class=""><br>
> But when I visualise the topogeom in QGIS it is still empty at the are<br>
> where sector '290390405000036' would be.<br>
<br>
</span>No wonder. It's indeed an EMPTY TopoGeometry in all effects<br>
as it has no components (being there no relation record for it).<br>
<br>
--strk;<br>
</blockquote></div><br></div></div></div></div></div>