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[Union[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 (Optional[BBox]) – Bounding box describing the area of interest.

  • geometry (Optional[Geometry]) – Geometry describing the area of interest.

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

  • resolution (Optional[Tuple[float, float]]) – 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 (Optional[Dict[str, Any]]) – A dictionary as generated by SentinelHubRequest.output helper method.

  • other_args (Optional[Dict[str, Any]]) – 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 (Union[str, MimeType]) – A mime type of one of ‘png’, ‘json’, ‘jpeg’, ‘tiff’.

  • other_args (Optional[Dict[str, Any]]) – 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 (Optional[Tuple[int, int]]) – Size of the image.

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

  • other_args (Optional[Dict]) – 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]