[postgis-users] questions/issues when creating a topology
Lucas Ferreira Mation
lucasmation at gmail.com
Fri Feb 26 08:25:47 PST 2016
Tks Strk,
I think I got it.
Actually the correct sector_code - face pair is '290390405000036' :
23157
So the correct code is:
UPDATE temp_geom_bahia2 SET tg_geom_dump_utm =
CreateTopoGeom('topo_bahia',3,1,'{{23157,3}}'::topology.topoelementarray)
WHERE cod_setor = '290390405000036'
I'll try to migrate all this knowledge to the wiki
2016-02-26 8:03 GMT-03:00 Sandro Santilli <strk at keybit.net>:
> On Thu, Feb 25, 2016 at 09:15:32PM +0000, Lucas Ferreira Mation wrote:
>
> > 2) In most test I did, I got an error when uploading one or two polygons
> > (out of a 900 polygons in Acre state). How can I add these afterward?
> > Assume all neighbor polygons have been added to the topogeometry. Thus
> the
> > topology already includes a face that would be the equivalente of one of
> > the error polygons. Let's that I see in QGIS that polygon A correspond to
> > face 13 of the topogeometry. Can I insert this by "brute force", by
> editing
> > the text the corresponding cell of the topogeometry column?
> >
> > So I found out sector code '290390405000036' (in the original dataset
> ids)
> > corresponds to face 13314 of the topogeometry. And I tried to insert this
> > by "brute" force:
> > UPDATE temp_geom_bahia2 SET tg_geom_dump_utm = '(28,1,13314,3)' WHERE
> > cod_setor = '290390405000036'
>
> That's not the way to do it, you need to use CreateTopoGeom:
> http://postgis.net/docs/manual-dev/CreateTopoGeom.html
>
> Never ever use a literal value for a TopoGeometry unless you are
> repairing some corrupted database. Those numbers are not references
> to primitives but to TopoGeometry identifiers in the topology's
> "relation" table, which contains the actual references to objects.
>
> > But when I visualise the topogeom in QGIS it is still empty at the are
> > where sector '290390405000036' would be.
>
> No wonder. It's indeed an EMPTY TopoGeometry in all effects
> as it has no components (being there no relation record for it).
>
> --strk;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160226/1e70e3d7/attachment.html>
More information about the postgis-users
mailing list