sentinelhub.api.process

Implementation of Sentinel Hub Process API interface.

class sentinelhub.api.process.SentinelHubRequest(evalscript, input_data, responses, bbox=None, geometry=None, size=None, resolution=None, **kwargs)[source]

Bases: SentinelHubBaseApiRequest

Sentinel Hub Process API interface

For more information check Process API documentation.

For details of certain parameters check the Process API reference.

Parameters:
  • evalscript (str) – Evalscript.

  • input_data (List[Dict[str, Any] | InputDataDict]) – A list of input dictionary objects as described in the API reference. It can be generated with the helper method SentinelHubRequest.input_data

  • responses (List[Dict[str, Any]]) – A list of output.responses objects as described in the API reference. It can be generated with the helper function SentinelHubRequest.output_response

  • bbox (BBox | None) – Bounding box describing the area of interest.

  • geometry (Geometry | None) – Geometry describing the area of interest.

  • size (Tuple[int, int] | None) – Size of the image.

  • resolution (Tuple[float, float] | None) – Resolution of the image. It has to be in units compatible with the given CRS.

  • data_folder – location of the directory where the fetched data will be saved.

  • config – A custom instance of config class to override parameters from the saved configuration.

  • kwargs (Any) –

property mime_type: MimeType

The mime type of the request.

static body(request_bounds, request_data, evalscript, request_output=None, other_args=None)[source]

Generate the Process API request body

Parameters:
  • request_bounds (Dict[str, Any]) – A dictionary as generated by SentinelHubRequest.bounds helper method.

  • request_data (List[Dict[str, Any]]) – A list of dictionaries as generated by SentinelHubRequest.input_data helper method.

  • evalscript (str) – Evalscript.

  • request_output (Dict[str, Any] | None) – A dictionary as generated by SentinelHubRequest.output helper method.

  • other_args (Dict[str, Any] | None) – Additional dictionary of arguments. If provided, the resulting dictionary will get updated by it.

Return type:

Dict[str, Any]

static output_response(identifier, response_format, other_args=None)[source]

Generate an element of output.responses as described in the Process API reference.

Parameters:
  • identifier (str) – Identifier of the output response.

  • response_format (str | MimeType) – A mime type of one of ‘png’, ‘json’, ‘jpeg’, ‘tiff’.

  • other_args (Dict[str, Any] | None) – Additional dictionary of arguments. If provided, the resulting dictionary will get updated by it.

Return type:

Dict[str, Any]

static output(responses, size=None, resolution=None, other_args=None)[source]

Generate an output part of the request as described in the Process API reference

Parameters:
  • responses (List[Dict[str, Any]]) – A list of objects in output.responses as generated by SentinelHubRequest.output_response.

  • size (Tuple[int, int] | None) – Size of the image.

  • resolution (Tuple[float, float] | None) – Resolution of the image. It has to be in units compatible with the given CRS.

  • other_args (Dict | None) – Additional dictionary of arguments. If provided, the resulting dictionary will get updated by it.

Return type:

Dict[str, Any]

download_list: List[DownloadRequest]
folder_list: List[str]