Search and Download Sentinel-2 Images#
Imports#
[ ]:
from sat_download.services import SatelliteImageDownloader
from sat_download.api import ODataAPI
from sat_download.data_types import SearchFilters
Search & Download#
[ ]:
service = SatelliteImageDownloader(ODataAPI(username = '', password = ''))
filters = SearchFilters(
collection = "SENTINEL-2",
processing_level = "L1C",
start_date = "2024-10-25",
end_date = "2024-10-31",
tile_id = "30TWM",
)
products = service.search(filters)
for product_id, product_data in products.items():
print(f"Product ID: {product_id}, Data: {product_data}")
service.bulk_download(products, '.')
Product ID: 5232b7c6-8150-4fc1-a672-03f5b35b25bc, Data: SatelliteImage(uuid='20241029_S2A', date='20241029', sensor='Sentinel-2', brother='A', identifier='Sentinel-2A', filename='S2A_MSIL1C_20241029T110201_N0511_R094_T30TWM_20241029T130146.zip', tile='30TWM')
Product ID: 6fdfd390-2e05-4fcc-8ba8-dd1b2f8acbd5, Data: SatelliteImage(uuid='20241027_S2B', date='20241027', sensor='Sentinel-2', brother='B', identifier='Sentinel-2B', filename='S2B_MSIL1C_20241027T111059_N0511_R137_T30TWM_20241027T120626.zip', tile='30TWM')
Downloading image at S2A_MSIL1C_20241029T110201_N0511_R094_T30TWM_20241029T130146.zip: 676MB [02:56, 3.83MB/s]
Downloading image at S2B_MSIL1C_20241027T111059_N0511_R137_T30TWM_20241027T120626.zip: 122MB [00:28, 4.27MB/s]