This question already has an answer here:

I have a PostGIS database where the data is in an unknown or incorrect coordinate system. Is there a way given some known points in the data to translate all the data to a specific coordinate system.

marked as duplicate by Andre Silva, MerseyViking, Midavalo Jan 11 '17 at 17:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I wrote a short blog post and some java code to solve this problem last week (and the pom to build it).


If it is just in an unknown co-ordinate system, but you know the EPSG code that is should be. You can run:


For example I have a table called lines, which has a geometry column called geom, which I want to set to EPSG:4326:

ALTER geom TYPE geometry(LineString, 4326) USING ST_SetSRID(geom, 4326)

Not the answer you're looking for? Browse other questions tagged or ask your own question.