Pergunta

I currently have a postgis database which uses a EPSG:900913 projection, how can I convert this to WGS 84, which I believe is the format used by Google Maps and OSM.

The DB was made with osm2pgsql, and I would like to be able to project the coordinates in python or by postgis.

Thanks for your time.

Foi útil?

Solução

Just transform your geometries using ST_Transform (https://postgis.net/docs/ST_Transform.html)

 ST_Transform(geom,4326)

If you want to transfrom a whole table do:

 UPDATE table_name SET geom_column = ST_Transform(geom_column,4326)
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top