TransWikia.com

Converting geometry of elements of table to move it from one srid system to another

Geographic Information Systems Asked on January 6, 2022

I have a table containing a column geom loaded from a shape file which was defined in lambert II system (27582), but when I loaded it I specified that I want to work in lambert 93 (2154).

Unfortunately when I load it in QGIS the coordinates are always in lambert II.

Is there a function allowing me to convert these coordinates and make them pass from lambert II (27582) to lambert 93 (2154)?

I would like to work only in lambert 93.

2 Answers

Go back and repeat the load using EPSG:27582 or use ST_SetSRID to set the correct CRS - then use the ST_Transform function to convert them to be in EPSG:2154 if that is what you require.

UPDATE table SET geom = ST_Transform(ST_SetSRID(geom, 27582), 2154);

Though QGIS is quite capable of reprojecting on the fly for you once the correct SRID is set using just:

UPDATE table SET geom = ST_SetSRID(geom, 27582);

Answered by Ian Turton on January 6, 2022

If your question is regarding PostGIS functions:

the ST_Transform function is what you are looking for. Something like this should do the trick:

UPDATE table
SET geom = ST_Transform(geom, 2154)

On the other hand, if your question is refering to a QGIS operation. You can change the SRID of your layer or the whole project from its properties.

Answered by ramiroaznar on January 6, 2022

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