after updating to 2.1.0, gdalwarp takes forever to complete
|Reported by:||dsogari||Owned by:||warmerdam|
|Severity:||normal||Keywords:||gdalwarp cutline blend|
The following command executes flawlessly using GDAL 2.0.2:
gdalwarp -of GTiff -cutline polygon.kml -crop_to_cutline -wo CUTLINE_ALL_TOUCHED=TRUE -wo CUTLINE_BLEND_DIST=1 map.tiff map_out.tiff
However, when executed in GDAL 2.1.0, it takes forever to complete.
I investigated the code and discovered it has something to do with the blend distance option. There is a loop inside the BlendMaskGenerator function in gdalcutline.cpp. This loop is executed very quickly in GDAL 2.0.2, but takes too long in 2.1.0.
For the life of me I can't figure out why. I just know that compiling the previous code of the gdalwarp utility with the 2.1.0 version of the lib does not trigger the issue.
The sample input files are attached. Please tell us if you experience the same issue and help us. We are almost done migrating our codebase.
Thank you in advance