Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve file naming to prevent overwrite #56

Open
AdrienWehrle opened this issue May 30, 2022 · 0 comments
Open

Improve file naming to prevent overwrite #56

AdrienWehrle opened this issue May 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@AdrienWehrle
Copy link
Owner

AdrienWehrle commented May 30, 2022

Build the file names corresponding to the query before the job is sent. Skip download if file already exists.

At the moment file names follow the convention {satellite}_{date}.tif which is independent of the location. Then, if files downloaded at different locations are being saved in the same folder, they will be overwritten.

An additional tag using the mean (longitude, latitude) coordinate of the box at the third decimal could make sense. For instance SENTINEL_2_20190802_4950169102.tif although that's quite ugly and hard to read. But there's probably a tag that makes more sense?

File naming for the SM download mode happens here:

# build new file name
new_filename = (
f"{self.store_folder}/"
+ f"{date}_{self.data_collection_str}_{split_box_id}.tif"
)

@AdrienWehrle AdrienWehrle added the enhancement New feature or request label May 30, 2022
@AdrienWehrle AdrienWehrle changed the title Don't download if file exists locally Improve file naming to prevent overwrite Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant