sentinelhub.evalscript

Module defining evalscript generation utilities

sentinelhub.evalscript.parse_data_collection_bands(data_collection, bands)[source]

Checks that all requested bands are available and returns the band information for further processing

Parameters:
  • data_collection (DataCollection) – A collection of requested satellite data.

  • bands (list[str]) – A list of band or meta band names to use in the evalscript.

Return type:

list[sentinelhub.data_collections_bands.Band]

sentinelhub.evalscript.generate_evalscript(data_collection, bands=None, meta_bands=None, merged_bands_output=None, prioritize_dn=True)[source]

Generate an evalscript based on the provided specifications. This utility supports generating only evalscripts with the mosaicking option set to SIMPLE.

Parameters:
  • data_collection (DataCollection) – A collection of requested satellite data.

  • bands (list[str] | None) – A list of band names to use in the evalscript. Defaults to using all bands provided by the collection.

  • meta_bands (list[str] | None) – A list of meta band names to use in the evalscript. By default no meta bands are added.

  • merged_bands_output (str | None) – If provided, bands will be concatenated into a single multi-band tiff with this name.

  • prioritize_dn (bool) – Use DN units if possible. Default is True. If DN units are not available, the default units for each specific band are used. DN units will be used regardless of the flag if they are the only possible choice.

Return type:

str