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 · May be fixed by #121
Open

Improve file naming to prevent overwrite #56

AdrienWehrle opened this issue May 30, 2022 · 0 comments · May be fixed by #121
Labels
enhancement New feature or request good first issue Good for newcomers

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
@AdrienWehrle AdrienWehrle added the good first issue Good for newcomers label Dec 3, 2024
This was referenced Dec 6, 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 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant