id summary reporter owner description type status priority milestone component version severity resolution keywords cc 7001 "[New for GDAL 2.2.x] ""gdalwarp"" with resampling+nodata doesn't work properly" justinmilk warmerdam "Recently I have upgraded GDAL from v2.1.0 straight to v2.2.1 and, unfortunately, noticed some discrepancies when using ""gdalwarp"". Starting with v2.2.0 (I've tested) ""gdalwarp"" with simultaneous use of '-r cubic' and '-srcnodata 0' options seems to cut less pixels from the border and sometimes leads to ""corrupted"" data border, which previously (in v2.1.0) wasn't the case. I couldn't find anything relating to this in the release notes and error threshold option ('-et') control did nothing for me, so I've decided to file a report. In attachment I'm providing results of performing the following command on B2 band of Landsat 8 scene - https://landsat-pds.s3.amazonaws.com/L8/044/034/LC80440342015224LGN00/index.html - with GDAL v2.1.0 (B2_10.TIF) and GDAL v2.2.1 (B2_21.TIF) respectively: {{{ gdalwarp -r cubic -te_srs ""+proj=longlat +datum=WGS84 +no_defs "" -te -123.22265625 37.4399740523 -123.046875 37.5794125134 -t_srs ""+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"" -ts 256 256 -dstalpha -srcnodata 0 B2.TIF B2_21.TIF }}} Further testing showed that without '-srcnodata' all new versions of GDAL produce identical output, and other resampling methods are affected too. In addition, when using '-r near' in GDAL v2.2.x, '-dstalpha' option doesn't produce expected result, seemingly ignoring nodata value and returning fully untransparent array (which wasn't the case in GDAL v2.1.0)." defect closed high 2.2.2 default 2.2.0 normal fixed