[gdal-dev] Nearest Neighbour resampling
Frank Warmerdam
warmerdam at pobox.com
Thu Nov 20 11:05:53 EST 2008
Ian Elliott wrote:
> Hi,
>
> An error is consistently occurring when I use the nearest neighbour
> technique to resample an 8-bit paletted image.
>
> Please see this page for an example:
> http://projects.exeter.ac.uk/msel/personnel/iae/gdal/
> (The resampling error is shown in image c).
>
> A possible solution I have discovered is to use 'Majority' resampling,
> but this is not available in gdal.
>
> Can anyone suggest why this is happening?
Ian,
I see the png files on the web site are RGB, and so apparently not the
original source data. I do not know why nearest neighbour resampling would
give the effect you are seeing. I think you will need to provide details
on how you accomplished the downsampling (along with the original data)
for me to say more.
There is no majority resampler in gdalwarp or gdal_translate. GDAL 1.6
does include the MODE resampler for computing overviews with gdaladdo which
I imagine is the same thing as the majority resampler.
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 | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list