Saturday, 23 June 2018

coordinate system - Reprojecting all geometries in PostGIS table?


I created a spatial table with SRID:4326. Now I want to change total projection to SRID:32644 into a new table. The old table should remain unchanged.



Answer



If you're on PostGIS 2.0+, you can go:


ALTER TABLE mytable 
ALTER COLUMN geom
TYPE Geometry(Point, 32644)
USING ST_Transform(geom, 32644);

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...