Skip to main content

Hi All,


I’m following the Multiple timestamps data example from the Sentinel Hub Process API how-to (Sentinel Hub Process API — Sentinel Hub 3.9.1 documentation). I’ve managed to get it working with the Ulyssys evalscript3 (Ulyssys Water Quality Viewer (UWQV) | Sentinel Hub custom scripts). Here is the code for the request:


def get_water_quality_request_class(_time_interval, bounds, crs):
# Defining area of interest
_bbox = BBox(mgeni_bounds, crs=crs)
_resolution = 30
_size = bbox_to_dimensions(
_bbox,
resolution=_resolution
)

# creating sentinelhub request class
return SentinelHubRequest(
evalscript=evalscript_ulyssys_water_quality_viewer,
input_data=_
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L2A,
time_interval= _time_interval,
mosaicking_order=MosaickingOrder.LEAST_CC
# mosaicking_order=None
)
],
responses=oSentinelHubRequest.output_response("default", MimeType.TIFF)],
bbox=_bbox,
size=_size
)

Is there a way to modify this code such that the return also gives back the date of the captured image? At the moment, I only know that the image was taken sometime within the time frame given.

Hi @sean.oheir1 ,


Sorry for the late reply.


From the request itself it’s a bit tricky to retrieve the timestamp of the acquisition as the image is mosaicked from the least cloud coverage acquisition.


The simplest workaround in your case would be making a Catalog API request for each _time_interval and finding the timestamp of the acquisition having the least cloud coverage. This will give you the timestamp of the acquisition returned in your Processing API request.


Reply