[gdal-dev] Why is the nearest neighbour resampling method the "worst interpolation"?

Frank Warmerdam warmerdam at pobox.com
Sat Mar 22 12:09:20 EDT 2008


Nikos Alexandris wrote:
> Dear gdal-developers,
> 
> in man gdalwarp:
> 
> " -rn: Use nearest neighbour resampling (default, fastest algorithm,
> worst interpolation quality). "
> 
> If I understand correct then the nearest neighbour method is the best to
> choose in order to preserve initial pixel values for thematic data.
> 
> Question(s): Why is it identified as "worst"?
> 
> Wouldn't the nn be a better choice for satellite imagery (in my case
> MODIS surf. reflectance values) that is intented to be segmented/
> classified or just upscaled (e.g. from 500m pix.size bands to 250m
> pix.size) later?

Nikos,

The comment really is meant to imply "worst apparently visual quality
in some contexts".  Nearest neighbour is absolutely the right interpolation
to use in many situations specifically because it does not mess with the
original digital values.

I'm not sure if this applies to your surface reflectance example.  It seems
that this sort of physical value might be appropriate for use of bilinear
interpolation.  Obviously, depending on your needs you should carefully
consider whether a resampling step is going to cause some unacceptable
damage to your data.

Despite the absolutist sound of the "worst interpolation quality" the
value of different approaches is often subjective and very situational.

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