[gdal-dev] Why is the nearest neighbour resampling method the
"worst interpolation"?
William Hughes
whughes at nb.sympatico.ca
Mon Mar 24 22:56:18 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"?
>
>
Well, the comment was "worst interpolation quality"
which is pretty much correct. On the other hand if you don't
want interpolation (a very common situation), this is the way to go.
Nearest Neighbour will usually not give surprising results,
so it is a good default.
>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?
>
>
Maybe, mabe not. The pixel values can be considered as noisy
samples of a continuous field. As such, interpolated values may
be considered to be a better guess as to the actual value at smaller
pixel sizes. On the other hand, the interpolation may have
unwanted interactions with your classification and/or change
detection methods.
Sometimes it helps to do your calculations with the original
pixel spacing, then resample for output or display.
- William Hughes
More information about the gdal-dev
mailing list