Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
py_tools_ds
Commits
ff9fa33d
Commit
ff9fa33d
authored
May 08, 2021
by
Daniel Scheffler
Browse files
Fixed linting.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
fe0ca77d
Pipeline
#22783
failed with stage
in 1 minute and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
py_tools_ds/geo/raster/conversion.py
View file @
ff9fa33d
...
...
@@ -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
[],
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment