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.
Asked
Active
Viewed 76 times
2 Answers
2
I wrote a short blog post and some java code to solve this problem last week (and the pom to build it).
Ian Turton
- 81,417
- 6
- 84
- 185
1
If it is just in an unknown co-ordinate system, but you know the EPSG code that is should be. You can run:
ST_SetSRID(geom,EPSG_code)
For example I have a table called lines, which has a geometry column called geom, which I want to set to EPSG:4326:
ALTER TABLE lines
ALTER geom TYPE geometry(LineString, 4326) USING ST_SetSRID(geom, 4326)
HeikkiVesanto
- 16,433
- 2
- 46
- 68
-
I dont know the EPSG code. – Tommie Jones Jan 11 '17 at 15:00
-
1If you know the general area, you can try: http://projfinder.com/ – HeikkiVesanto Jan 11 '17 at 15:07