TransWikia.com

PostGIS create topogeom from existing geometry column

Geographic Information Systems Asked by user51044 on January 14, 2021

I tried to create topogeom using postgis.topology extention.

SELECT topology.AddTopoGeometryColumn('roadtopo','public','roads','topogeom ','LINESTRING');

UPDATE roads SET topogeom = topology.toTopoGeom(geom,'roadtopo',1,0.00028);

But I receive an error;

ERROR: column "topogeom" of relation "roads" does not exist
LINE 1: UPDATE roads SET topogeom = topology.toTopoGeom(geom,’roadto…

What I am doing wrong?

One Answer

In the first request you write 'topogeom ' and no 'topogeom', so the name of your column is : "topogeom " (with a space).

This request should work :

UPDATE roads SET "topogeom " = topology.toTopoGeom(geom,'roadtopo',1,0.00028);

Of course you can also correct the name of the topology column :

SELECT topology.AddTopoGeometryColumn('roadtopo','public','roads','topogeom','LINESTRING');
UPDATE roads SET topogeom = topology.toTopoGeom(geom,'roadtopo',1,0.00028);

Correct answer by Atm on January 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP