Commit 68472af8 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Only use a callback if progress is True.

parent 36586fc1
......@@ -98,7 +98,7 @@ def raster2polygon(array: np.ndarray,
band = ds.GetRasterBand(1)
band.WriteArray(array)
callback = gdal.TermProgress_nocb if array.size > 1e8 else None
callback = gdal.TermProgress_nocb if array.size > 1e8 and progress else None
gdal.SieveFilter(srcBand=band, maskBand=None, dstBand=band, threshold=min_npx,
# connectedness=4 if exact else 8,
connectedness=4, # 4-connectedness is 30% faster
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment