Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ESPACE-DEV
pyrasta
Commits
e7922b61
Commit
e7922b61
authored
Jul 08, 2021
by
benjaminpillot
Browse files
Add progress bar option
parent
e3283617
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyrasta/tools/calculator.py
View file @
e7922b61
...
...
@@ -81,9 +81,14 @@ def _raster_calculation(raster_class, out_file, gdal_driver, sources,
is_first_run
=
True
y
=
0
for
win_gen
in
tqdm
(
split_into_chunks
(
window_gen
,
width
),
if
description
:
iterator
=
tqdm
(
split_into_chunks
(
window_gen
,
width
),
total
=
height
,
desc
=
description
):
desc
=
description
)
else
:
iterator
=
split_into_chunks
(
window_gen
,
width
)
for
win_gen
in
iterator
:
with
mp
.
Pool
(
processes
=
nb_processes
)
as
pool
:
list_of_arrays
=
list
(
pool
.
map
(
fhandle
,
...
...
@@ -120,8 +125,3 @@ def _raster_calculation(raster_class, out_file, gdal_driver, sources,
# Close dataset
out_ds
=
None
# raster = raster_class(out_file.path)
# raster._temp_file = out_file
#
# return raster
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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