Data Types#

This module contains data structures used throughout the library.

Search Types#

class sat_download.data_types.search.SatelliteImage(uuid: str, date: str, sensor: str, brother: str, identifier: str, filename: str, tile: str)[source]#

Bases: object

Class representing the metadata of a satellite image.

This class stores standardized metadata about satellite imagery from different sources like Sentinel and Landsat for consistent processing.

uuid#

Unique identifier for the image

Type:

str

date#

Acquisition date of the image in format ‘YYYYMMDD’

Type:

str

sensor#

Sensor or satellite platform name (e.g., ‘Sentinel-2’, ‘Landsat-8’)

Type:

str

brother#

Satellite constellation member identifier (e.g., ‘A’ for Sentinel-2A)

Type:

str

identifier#

Combined satellite and brother identifier (e.g., ‘Sentinel-2A’)

Type:

str

filename#

Output filename for downloaded image

Type:

str

tile#

Tile or path/row identifier for the image

Type:

str

Notes

The structure of attributes is designed to work across different satellite data providers with a consistent interface.

brother: str#
date: str#
filename: str#
identifier: str#
sensor: str#
tile: str#
uuid: str#
class sat_download.data_types.search.SearchFilters(collection: str, start_date: str, end_date: str, processing_level: str = None, geometry: str = None, tile_id: str = None)[source]#

Bases: object

Class for specifying search filters for satellite imagery.

This class provides a standardized way to specify search criteria across different satellite data providers and APIs.

Parameters:
  • collection (str) – Collection identifier (e.g., ‘SENTINEL-2’, ‘landsat_ot_c2_l1’)

  • start_date (str) – Start date for the search in format ‘YYYY-MM-DD’

  • end_date (str) – End date for the search in format ‘YYYY-MM-DD’

  • processing_level (str, optional) – Processing level filter (e.g., ‘L1C’, ‘L2A’)

  • geometry (str, optional) – WKT geometry string for spatial filtering (e.g., ‘POINT(lon lat)’)

  • tile_id (str, optional) – Specific tile identifier to filter by

Examples

>>> filters = SearchFilters(
...     collection="SENTINEL-2",
...     processing_level="L1C",
...     start_date="2024-10-01",
...     end_date="2024-10-31",
...     tile_id="30TWM",
... )
>>> filters.is_set('geometry')
False
collection: str#
end_date: str#
geometry: str = None#
is_set(value: str) bool[source]#

Check if a filter attribute is set (not None).

Parameters:

value (str) – The name of the attribute to check

Returns:

True if the attribute exists and is not None, False otherwise

Return type:

bool

processing_level: str = None#
start_date: str#
tile_id: str = None#
sat_download.data_types.search.SearchResults#

Type alias representing search results from satellite APIs.

A dictionary mapping product IDs (keys) to SatelliteImage objects (values).

alias of Dict[str, SatelliteImage]