[gdal-dev] gdalwarp rather than gdal_translate

Diana Esch-Mosher desch-mosher at lanl.gov
Thu Feb 14 15:55:22 EST 2008


Frank,

Well, this isn't quite doing what I thought. It is no longer 
transforming the file (yeah!)  but is not resampling to the new size. If 
I give it a new size, say slightly smaller (I'm trying to resample to a 
common GSD), then it just crops the image to the new smaller size, 
rather than downsizing. FYI, I'm using 1.3.2.0 ..... is that a problem? 
Same goes for making a larger image, it is not resampling to a larger 
size, and additionally it is washing it out.

Thanks,

Diana

Frank Warmerdam wrote:
> Diana Esch-Mosher wrote: 
>> I looked at gdalwarp and I see where it checks to see if the 
>> destination file exists, if so then it reads the TargetSRS from that 
>> dataset. So I should pre-create to the target size that I am 
>> requesting in gdalwarp? I have no problem in python  pre-creating the 
>> file, copying the metadata, geotransform, and projection data ... 
>> anything else I should copy? Then I just call gdalwarp as gdalwarp 
>> -rcs -ts x y -of  NITF (or any other -of  I want).
>
> Diana,
>
> Right, except of course you don't specify parameters used to create the
> file (like -of or -ts).
>
> Best regards,



More information about the gdal-dev mailing list