[gdal-dev] Gdalwarp speed comparison

Frank Warmerdam warmerdam at pobox.com
Fri Feb 29 11:14:07 EST 2008

Jukka Rahkonen wrote:
> Hi,
> I made some time ago a few measurements about the speed in of reprojecting
> images with gdalwarp and and another software.  Results can be found from here:
> http://forums.ermapper.com/viewtopic.php?t=2889
> Another software had an option to use an option called "Speed optimization"
> which had a big effect on speed. It believe it relates somehow to warping either
> in bigger blocks or pixel-by-pixel. I wonder if gdalwarp is utilising something
> similar because it tends to be so fast?


By default gdalwarp uses a linear approximator for the transformations with
a permitted error of (I think) a quarter pixel.  This basically transforms
three points on a scanline.  The start, end and middle.  Then it compares the
linear approximation of the center based on the end points to the real thing
and checks the error.  If the error is less than the error threshold then
the remaining points are approximated (in two chunks utilizing the center
point).  The error threshold (in pixels) can be controlled with the
gdalwarp -te switch.

So if you want to compare a true pixel-by-pixel reprojection you should
use "-te 0" which disables this approximator entirely.

I assume the speed optimization techniques in the ERMapper tool are in some
fashion similar.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the gdal-dev mailing list