Download Sentinel-1 from ASF#
This tutorial demonstrates how to download Sentinel-1 data from the ASF Data Search Vertex.
Tip
If you want to download Sentinel data from the Sentinel official website, please refer to the Sentinel-2 Data Download Tutorial.
1. Select Sentinel-1 data#
Go to the ASF Data Search Vertex: https://search.asf.alaska.edu/, and download the metadata in the .geojson format.
2. Download data#
2.2 Bulk Download#
Note
Following script will using geopandas to read the ASF metadata (*.geojson) and get the sentinel-1 urls. If you don’t have geopandas installed, you can install it via pip:
pip install geopandas
Create a Python file, copy the code below, and modify the folder_out and asf_file paths according to your situation. Then execute it to download files in bulk.
Tip
DataDownloader can automatically skip downloaded files and support resumable downloads. If the download is interrupted and some files are incomplete, simply re-execute this script.
import geopandas as gpd
from data_downloader import downloader
# Specify the folder to save the data
folder_out = "/Volumes/Data/sentinel1"
# Load the ASF metadata
asf_file = "/Volumes/Data/asf-datapool-results-2024-03-29_11-24-18.geojson"
# get the sentinel-1 urls from the ASF metadata
df_asf = gpd.read_file(asf_file)
urls = df_asf.url
# Download data
downloader.download_datas(urls, folder_out)
2.3 Retry Download#
If your download is frequently interrupted, you can use the following code to automatically retry the download:
from pathlib import Path
import geopandas as gpd
from data_downloader import downloader
# Specify the folder to save the data
folder_out = Path("/Volumes/Data/sentinel1")
# Load the ASF metadata
asf_file = "/Volumes/Data/asf-datapool-results-2024-03-29_11-24-18.geojson"
# get the sentinel-1 urls from the ASF metadata
df_asf = gpd.read_file(asf_file)
urls = df_asf.url
# Download data
while True:
try:
downloader.download_datas(urls, folder_out)
# check if the download is completed
files_local = list(folder_out.glob("*.zip"))
if len(files_local) >= len(urls):
print("Download completed.")
break
except Exception as e:
print(e)
print("Retry download...")
continue