TransWikia.com

Duplicate geometry column in geometry_columns

Geographic Information Systems Asked by Xavier LALANDE on May 30, 2021

I have a PostgreSQL/PostGIS table with one geometry column. When I connect it to QGIS I see two of the same column:

enter image description here

If I make a request in PostgreSQL

SELECT * FROM geometry_columns WHERE f_table_name = 'mmune'

I can see, my view geometry_columns have two columns

enter image description here

I try to run function Populate_Geometry_Columns but the result is the same

SELECT Populate_Geometry_Columns('public.t_adm_commune'::regclass);

I try to redefine the column but the result is the same

ALTER TABLE mmune ALTER COLUMN geom type Geometry(Multipolygon,2) USING geom::Geometry(Multipolygon, 2);

If I question the tables pg_class and pg_attribute I see once column, that’s ok.

Have you got any idea ?

One Answer

The problem can be caused by geometries with different SRIDs in the same column. The QGIS-Data-Browser will create a layer for each distinct SRID in the geometry column. You can query the SRIDs of a geometry column with the following statement.

SELECT DISTINCT ST_SRID(geom) from mmune;

Answered by EikeMike on May 30, 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