TransWikia.com

I have a table, this table contains attributes written in GML and I want to transfer these GML to geometry in QGIS

Geographic Information Systems Asked on December 13, 2020

enter image description here

Some attribute written as a .GML file in PostgreSQL and I want to transfer these GML to polygon, so that the table becomes a vector table.

One Answer

You should convert GML geometry into PostGIS native (WKB) geometry and update the new column with the GML geometry:

CREATE EXTENSION PostGIS; -- if not enabled yet
ALTER TABLE your_table ADD COLUMN the_geom geom(MULTIPOLYGON, 32630);
UPDATE TABLE your_table SET the_geom = ST_GeomFromGML(geom);

You can drop geom column with GML geometry, and you can directly use this table from QGIS after creating a connection to your database from QGIS.

Answered by Zoltan on December 13, 2020

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