Services#
This module provides the main interface for satellite image searching and downloading operations.
- class sat_download.services.downloader.SatelliteImageDownloader(api: SatelliteAPI)[source]#
Bases:
object
A class to handle satellite image searching and downloading operations.
This class provides a simplified interface to search for satellite images using various filters and download them.
- Parameters:
api (SatelliteAPI) – The satellite API client to use for API operations
See also
sat_download.api.base.SatelliteAPI
Base class for satellite API clients
sat_download.api.odata.ODataAPI
Implementation for Copernicus Data Space API
sat_download.api.usgs.USGSAPI
Implementation for USGS Earth Explorer API
- bulk_download(images: Dict[str, SatelliteImage], outdir: str) None [source]#
Download multiple satellite images in bulk.
- Parameters:
images (SearchResults) – The search results containing image IDs to download
outdir (str) – The output directory where the images will be saved
- Returns:
The files are saved to the specified location on success
- Return type:
None
Notes
Exceptions are caught and printed to console.
- bulk_search(filters: SearchFilters) Dict[str, SatelliteImage] [source]#
Perform a bulk search operation using specified filters.
- Parameters:
filters (SearchFilters) – The search filters to apply to the bulk search
- Returns:
The results from the bulk search operation
- Return type:
SearchResults
Notes
Exceptions are caught and printed to console.
- download(image_id: str, out_dir: str, outname: str) None [source]#
Download a satellite image by its ID.
- Parameters:
image_id (str) – The unique identifier of the image to download
outdir (str) – The output directory where the image will be saved
outname (str) – The output filename where the image will be saved
- Returns:
The file is saved to the specified location on success
- Return type:
None
Notes
Exceptions are caught and printed to console.
- search(filters: SearchFilters) Dict[str, SatelliteImage] [source]#
Perform a standard search operation using specified filters.
- Parameters:
filters (SearchFilters) – The search filters to apply to the search
- Returns:
The results from the search operation
- Return type:
SearchResults
Notes
Exceptions are caught and printed to console.