Skip to content

Commit

Permalink
remove intermediate data
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestfwilliams committed May 29, 2024
1 parent e3b442b commit 1b30f8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/opera_rtc_s1_browse/create_browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def create_browse_image(co_pol_path: Path, cross_pol_path: Path, working_dir: Pa
cross_pol_ds = None
browse_ds = None

browse_path = working_dir / f'{co_pol_path.stem}_browse.tif'
browse_path = working_dir / f'{co_pol_path.stem}_rgb.tif'
gdal.Warp(
browse_path,
tmp_browse_path,
Expand Down Expand Up @@ -170,6 +170,8 @@ def create_browse_and_upload(

co_pol_path, cross_pol_path = download_data(granule, working_dir)
browse_path = create_browse_image(co_pol_path, cross_pol_path, working_dir)
co_pol_path.unlink()
cross_pol_path.unlink()

if bucket:
upload_file_to_s3(browse_path, bucket, bucket_prefix)
Expand Down

0 comments on commit 1b30f8a

Please sign in to comment.