[PATCH] gdaladdo inserts nodata values where they shouldn't be
|Reported by:||larsl||Owned by:||larsl|
Sometimes when gdaladdo generates overview layers for a band with a colour tables and a NODATA value it inserts NODATA pixels in the overview even though there are no NODATA pixels in the corresponding pixels in the source layer. This is because GDALFindBestEntry(), which finds the colour table entry whose colour best matches the averaged RGB value, doesn't care if the best match is NODATA or not. The attached patch makes GDALFindBestEntry() NODATA-aware, which fixes this bug for the 'average' and 'gauss' resampling methods.