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.

有帮助吗?

解决方案

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)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top