[postgis-users] questions/issues when creating a topology
Sandro Santilli
strk at keybit.net
Fri Feb 26 03:03:53 PST 2016
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;
More information about the postgis-users
mailing list