[gdal-dev] gdalwarp and image size change

Even Rouault even.rouault at mines-paris.org
Sat Apr 4 07:06:06 EDT 2009


The small difference in sizes is not so small and at the first sight, it 
doesn't look wrong.

But the reprojection might not be as exact as you wish. If you use proj >= 
4.6.0, no ellipsoid changes would have been done, as your source SRS has no 
datum specification, but only an ellipsoid specification. You should probably 
add +towgs84 parameters in your source SRS to specify a datum shift.

"The big change in PROJ 4.6.0 was that pj_transform() will no longer try to
apply datum shifts if either the source or destination lack a datum
declaration (either +datum, +towgs84 or +nadgrids)"

Le Saturday 04 April 2009 11:09:52 erik, vous avez écrit :
> Hi,
>
> I'm new to gdal, geotiffs & stuff, so sorry if this all seems obvious.
> I've been trying to reproject a geotiff from "+proj=utm +zone=29
> +ellps=intl +units=m +no_defs" (European 1950, zone 29 - Portugal) to
> WGS84.
>
> gdalwarp -s_srs "+proj=utm +zone=29 +ellps=intl +units=m +no_defs" -t_srs
> "+proj=latlong +datum=WGS84" map.tif map3.tif
>
> The original file is 5366 x 3387
> but ... the reprojected file is 5695 x 2863
>
> With the naked eye I can't see much change. Is this behaviour normal?
>
> Concerning the original file, it was built with gcp's in gdal_translate and
> then warped in the original projection. Maybe this isn't enough? In the
> ozi2geotiff.py script I see he does a second translate with several
> creation options (-co) for tiled, block(x,y)size, compress and predictor.
> As well as some other stuff with convert, listgeo and geotifcp.
>
> Thanks,
> Erik.




More information about the gdal-dev mailing list