<div dir="ltr">Hello,<br><br>I'm seeing an issue which is present in 2.2.2 (tags/2.2.2 from github) and seen in 1.11.3 (Ubuntu 16.04) but not present in 1.10.1 (Ubuntu 14.04).<br><br>If a raster with an alpha channel has nodata set, and overviews via gdaladdo are created, the overviews use the nodata value for the value of the alpha channel.  However, using the nearest resampling method correctly sets the alpha to zero. All other resampling methods except nearest seem to give the same wrong result. <br><br>I've created a repository with all the files and readme containing the workflow.<br><a href="https://github.com/timwaters/gdal_gdaladdo_issue">https://github.com/timwaters/gdal_gdaladdo_issue</a> with screenshots of the expected and observed files opened in Gimp to view the pixel values.<br><br>The use case is <a href="http://mapwarper.net">mapwarper.net</a> where users upload ungeoreferenced images, they get converted to tifs and have overviews added, then they can mask them (gdal_rasterize) and then warp the masked files, with overviews added finally. I'm updating the server to run on Ubuntu 16.04 and will have to compile gdal.<br><br>Flow is:<br><br>#Apply overviews to ungeoreferenced raster<br>gdaladdo -r average treasure_island.tif 2 4 8 16<br><br>#Rasterise ungeoreferenced raster with the cropping mask <br>gdal_rasterize -i  -b 1 -b 2 -b 3 -burn 17 -burn 17 -burn 17  20.gml -l features treasure_island.tif<br><br>#Georeference & warp the raster<br>gdal_translate -a_srs '+init=epsg:4326' -of VRT treasure_island.tif temp.vrt  -gcp 100.38, 83.096, -122.377, 37.830 -gcp 430.1966, 370.08, -122.363, 37.8207 -gcp 313.69, 61.68, -122.368, 37.831<br>gdalwarp -rn  -dstalpha -srcnodata '17 17 17' -s_srs 'EPSG:4326' temp.vrt treasure_island_warped.tif -co TILED=YES -co COMPRESS=LZW<br><br>#Apply overviews to georeferenced raster<br>gdaladdo -r average treasure_island_warped.tif 2 4 8 16<br><br>Expected - transparent areas in overviews should be 17,17,17 with alpha channel set to 0<br>Observed - transparent areas in overviews are 17,17,17 with alpha also set to 17<br><br>Potential workarounds are 1) to set the nodata value to 0 instead of 17, however a few maps uploaded are black and white scans and so this might not be good for those maps which have pure black in them (that's why I'm using the 17 value), and 2) to use nearest neighbour for resampling, but it does not look good at all online. <br><br>many thanks in advance and your help is appreciated!<br><br>Regards,<br><br>Tim<br></div>