Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#272 closed defect (fixed)

osgeo4w - PROJ.4 strings do not work with GDAL

Reported by: tcgeophysics Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:
Cc:

Description

Hi All,

I've using the OSGeo4W install of GDAL for a little while now and I just realized that GDAL utilities does not work when using PROJ.4 string to specify -s_srs or -t_srs. I usually defines my srs with EPSG codes and this does not give me any trouble. But I recently needed to use a custom projection and found out about the issue. I am running it with Windows 7 and I ran the commands in an OSGEO4w terminal window. The variables OSGEO4W_ROOT, PROJ_LIB and GDAL_DATA are pointing to the correct directories.

If I enter the following command:

gdalwarp -t_srs '+proj=utm +zone=11 +datum=WGS84' input.tif output_utm11.tif

I get the following message:

ERROR 1: Translating source or target SRS failed: '+proj=utm'

Any idea on how to solve this?

Thanks

Tom

Change History (3)

comment:1 by jef, 13 years ago

try quotes:

gdalwarp -t_srs "+proj=utm +zone=11 +datum=WGS84" input.tif output_utm11.tif

in reply to:  1 comment:2 by tcgeophysics, 13 years ago

Resolution: fixed
Status: newclosed

Replying to jef:

try quotes:

gdalwarp -t_srs "+proj=utm +zone=11 +datum=WGS84" input.tif output_utm11.tif

I did not think about that syntax issue as simple quote are used in examples on the gdalwarp manual page. Double quotes work perfectly!

Thanks

comment:3 by warmerdam, 13 years ago

The problem is that quoting techniques vary depending on the shell and the examples were prepared on linux. Perhaps double quotes would be more universal.

Note: See TracTickets for help on using tickets.