[gdal-dev] Nearest Neighbour resampling

Seth Price seth at pricepages.org
Fri Nov 21 14:03:57 EST 2008

I would also be very interested in seeing the command which produced those
files. It looks like something I would expect to see as a result of
overview building after this patch (and average resampling):


On Thu, November 20, 2008 10:05 am, Frank Warmerdam wrote:
> 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
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

More information about the gdal-dev mailing list