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

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Sat Mar 22 12:21:53 EDT 2008


On Sat, 2008-03-22 at 12:09 -0400, Frank Warmerdam wrote:
> 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.

I use MOD09 surface reflectance. The product is already corrected for
atmospheric effects. So, if I am not wrong, the "course" of this data is
something like: DN's -> Radiance -> Atmospheric correction (6S) ->
Surface reflectance.

Resampling means in any case altering at some extent the pixel values.
And my work involves a change detection and a classification. And all
this at 250 and 500m (per pixel @ nadir!). From my small experiences I
judge the nn to be best for this.

>   It seems
> that this sort of physical value might be appropriate for use of bilinear
> interpolation.

I will try to test-out. Not sure how to validate/ compare but I will
hunt it.

> 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.

Is it bad idea to propose something like "fastest interpolation method,
worst for smoothing" or something like that? Sorry for my wording, I am
new in the field.

Thank you for your time and kind regards,

Nikos



More information about the gdal-dev mailing list