Skip to content

Commit

Permalink
show both processes
Browse files Browse the repository at this point in the history
  • Loading branch information
dfguerrerom committed Sep 20, 2024
1 parent 17d2692 commit 4e30af7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions component/scripts/gee.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ def get_gee_vrt(

nb_points = max(1, len(ee_buffers))
total_images = len(mosaics) * nb_points
output.reset_progress(total_images, "Progress")
output.reset_progress(total_images, "Requesting images....")

# Collect EE API results
ee_tasks, satellites = get_ee_tasks(
mosaics, ee_buffers, descriptions, sources, bands, tmp_dir
mosaics, ee_buffers, descriptions, sources, bands, tmp_dir, output
)

output.reset_progress(total_images, "Downloading images....")

# Download images in parallel and get the downloaded file paths
downloaded_files = download_images_in_parallel(ee_tasks, output)

Expand Down Expand Up @@ -158,12 +160,7 @@ def get_image(


def get_ee_tasks(
mosaics,
ee_buffers,
descriptions,
sources,
bands,
tmp_dir,
mosaics, ee_buffers, descriptions, sources, bands, tmp_dir, output
) -> Tuple[dict[int, List[Params]], dict]:
"""
Collect Earth Engine API results for each buffer and year.
Expand Down Expand Up @@ -209,6 +206,8 @@ def get_ee_tasks(
}
)

output.update_progress()

return ee_tasks, satellites


Expand Down

0 comments on commit 4e30af7

Please sign in to comment.