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

downloading orbit #49

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dependencies:
- gdal
- isce3
- shapely
- sentineleof
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ numpy
gdal
#isce3 # since the conda-installed isce3 is not the most updated version, installing isce3 from stratch is recommended, to stay in sync with isce3 development.
shapely
sentineleof
10 changes: 10 additions & 0 deletions src/s1reader/s1_orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import warnings

from eof.download import download_eofs

# date format used in file names
FMT = "%Y%m%dT%H%M%S"
Expand Down Expand Up @@ -131,3 +132,12 @@ def get_orbit_file_from_dir(path: str, orbit_dir: str) -> str:
orbit_path = get_orbit_file_from_list(path, orbit_file_list)

return orbit_path

def download_orbit_file(safe_path: str, save_dir: str='.'):
if not os.path.isdir(save_dir):
raise NotADirectoryError(f"{save_dir} not found")

downloaded_files = download_eofs(sentinel_file=safe_path,
save_dir=save_dir)

return downloaded_files