Opened 16 years ago

Last modified 15 years ago

#737 closed defect (invalid)

gdalwarp -tr output resolution fails

Reported by: zachary@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:


When reprojecting a bunch of files with slightly different pixel sizes (all 
around 1 foot but not exactly) from New Mexico state plane feet to UTM zone 13 
meters, I wanted to make sure it resampled 1 foot (input) to 0.3048001 meters 
(output), or at least 0.3048 meters, so I issue the following:

C:\Temp>gdalwarp.exe -s_srs "ESRI::NM83-CF.prj" -t_srs "ESRI::UTM27-13.prj" -ord
er 3 -tr "0.3048 0.3048" -srcnodata "0 0 0" -dstnodata "0 0 0" -rcs -of GTiff -c
o "TFW=YES" aa22.tif test.tif

And it instead tells me the usage is incorrect.  But if I leave out the -
tr "0.3048 0.3048" it runs.  No matter what pixel size I use, it doesn't 
understand the -tr flag, although in the past I vaguely remember something 
about it not liking only pixel sizes less than 1.0.

Change History (2)

comment:1 Changed 16 years ago by warmerdam


I think the problem is your quoting of the arguments.  It is important
that the x and y arguments be seperate arguments to gdalwarp.  In fact, you
should not really need to quote any of the arguments though the only ones 
aversely affected will be the -tr, -srcdata and -dstdata arguments. 


C:\Temp>gdalwarp.exe -s_srs "ESRI::NM83-CF.prj" -t_srs "ESRI::UTM27-13.prj" -ord
er 3 -tr 0.3048 0.3048 -srcnodata 0 0 0 -dstnodata 0 0 0 -rcs -of GTiff -c
o "TFW=YES" aa22.tif test.tif

comment:2 Changed 15 years ago by warmerdam


Please feel free to reopen if you believe it is a bug in the program and can
provide more supporting info for that. 

Best regards,

Note: See TracTickets for help on using tickets.