sentinelhub.api.base_request
Implementation of base Sentinel Hub interfaces
- class sentinelhub.api.base_request.SentinelHubBaseApiRequest(download_client_class, *, data_folder=None, config=None)[source]
Bases:
DataRequest
A base class for Sentinel Hub interfaces
- Parameters:
download_client_class (Callable) – A class implementing a download client
data_folder (str | None) – location of the directory where the fetched data will be saved.
config (SHConfig | None) – A custom instance of config class to override parameters from the saved configuration.
- payload: dict[str, Any] = {}
- static input_data(data_collection, *, identifier=None, time_interval=None, maxcc=None, mosaicking_order=None, upsampling=None, downsampling=None, other_args=None)[source]
Generate the input data part of the request body
- Parameters:
data_collection (DataCollection) – One of supported Process API data collections.
identifier (str | None) – A collection identifier that can be referred to in the evalscript. Parameter is referenced as “id” in service documentation. To learn more check data fusion documentation.
time_interval (Tuple[None | str | date, None | str | date] | None) – A time interval with start and end date of the form YYYY-MM-DDThh:mm:ss or YYYY-MM-DD or a datetime object
maxcc (float | None) – Maximum accepted cloud coverage of an image. Float between 0.0 and 1.0. Default is 1.0.
mosaicking_order (MosaickingOrder | None) – Mosaicking order, which has to be either ‘mostRecent’, ‘leastRecent’ or ‘leastCC’.
upsampling (ResamplingType | None) – A type of upsampling to apply on data
downsampling (ResamplingType | None) – A type of downsampling to apply on data
other_args (dict[str, Any] | None) – Additional dictionary of arguments. If provided, the resulting dictionary will get updated by it.
- Returns:
A dictionary-like object that also contains additional attributes
- Return type:
- class sentinelhub.api.base_request.InputDataDict(input_data_dict, *, service_url=None)[source]
Bases:
dict
An input data dictionary which also holds additional attributes
- Parameters:
input_data_dict (dict[str, Any]) – A normal dictionary with input parameters
service_url (str | None) – A service URL defined by a data collection