Skip to content

Improve file naming to prevent overwrite #56

@wehrad

Description

@wehrad

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:

https://github.com/AdrienWehrle/earthspy/blob/9ee52fba8ed41af57331c25cd252142f4a12de80/earthspy/earthspy.py#L964-L968

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions