Commit ff9fa33d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed linting.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent fe0ca77d
Pipeline #22783 failed with stage
in 1 minute and 42 seconds
......@@ -73,10 +73,16 @@ def raster2polygon(array, gt, prj, DN2extract=1, exact=True, maxfeatCount=None,
fd = ogr.FieldDefn('DN', ogr.OFTInteger)
mem_layer.CreateField(fd)
# set callback
callback = ProgressBar(prefix='Polygonize progress ', suffix='Complete', barLength=50, timeout=timeout,
use_as_callback=True) \
if progress and not q else Timer(timeout, use_as_callback=True) if timeout else None
try:
timeout = 0.01
# set callback
callback = \
ProgressBar(prefix='Polygonize progress ',
suffix='Complete',
barLength=50,
timeout=timeout,
use_as_callback=True) \
if progress and not q else Timer(timeout, use_as_callback=True) if timeout else None
# run the algorithm
status = gdal.Polygonize(src_band, src_band.GetMaskBand(), mem_layer, 0, ["8CONNECTED=8"] if exact else [],
......
Markdown is supported
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