1

I am trying to change the CRS of a .tif file using gdalwarp in the OSGeo4W command prompt. Before I would do it manually in QGIS by Export > Save As > Set CRS. However I have a lot of files so I want to automate it. Here is the command:

gdalwarp -t_srs EPSG:4326 in.tif out.tif

However I get this error message:

ERROR 1: PROJ: proj_create_from_database: prime meridian not found
Creating output file that is 190P x 140L.

What am I missing? I've looked through the documentation but am unable to find another command that would solve this.

EDIT: I tried to add the -s_srs in the command: gdalwarp -s_srs '+proj=merc +lon_0=-115.75 +lat_ts=33.3 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' -t_srs EPSG:4326 in.tif out.tif

I get the error:

ERROR 1: PROJ: proj_create: unrecognized format / unknown name
ERROR 1: Translating source or target SRS failed:
'+proj=merc

Here is the CRS of the in.tif:

Unknown CRS: PROJCRS["WGS 1984. Custom Ellipsoid: Semi-major axis=6378137.000000, Semi-minor axis=6356752.314245.;scale=0.00100000000000000002,offset=0.00000000000000000000",BASEGEOGCRS["WGS_1984",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.25722356049,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],CONVERSION["Mercator (variant B)",METHOD["Mercator (variant B)",ID["EPSG",9805]],PARAMETER["Latitude of 1st standard parallel",33.3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Longitude of natural origin",-115.75,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["northing",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]] - Projected
2
  • What's the source CRS? What happens if you try to specify it explicitly with -s_srs? Commented Jun 23, 2020 at 0:07
  • I edited the question. Still got an error. Commented Jun 23, 2020 at 18:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.