1

I have a series of rasters saved as geotiff's that are assigned the incorrect CRS. Is it possible to change the CRS of the raster without reprojecting?

When I open the files, QGIS reads the CRS information from the file as EPSG 2285 (Washington State Pane North, US Feet), and puts them in the wrong place. The rasters are actually in EPSG 2286 (Washington State Plane South US Feet). Changing the assigned CRS to EPSG 2286 moves the rasters to the correct location.

I would like to save the correct CRS information with the file. Is it possible to do this without reprojecting? If it were a shapefile, I could just change the .prj file so it matches how the file is actually saved, is something similar with a .tiff raster?

2

You can use gdal_translate to override the reference system using the -a_srs switch.

gdal_translate -a_srs EPSG:2286 input.tif output.tif

Copy from the gdal_translate doc:

-a_srs <srs_def>

Override the projection for the output file. The<srs_def> may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT. No reprojection is done.

gdal_translate is one of the programs of gdal utilities. You can write a short shell/powershell script to translate all files quickly.

2
  • 1
    Even better to use gdal_edit gdal.org/programs/gdal_edit.html and edit just the metadata without creating a new file. Gdal_edit is a Python script and requires that the GDAL Python bindings are installed. – user30184 Mar 10 at 21:05
  • @user301849, you are right, gdal_edit.py is a better solution. – Zoltan Mar 11 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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