Hi,
I am trying to know or get a list of the dates of images available for a specific area, previously when I used Sentinel API and selected the area of interest, the files (folders) were downloaded and in them contained the date on which the shots were taken, currently with Sentinel Hub, it allows me to download several requests (TAR file) on the dates that I have indicated, for example from January 01 to January 31, 2018, but I only want to download the images that were taken by the Sentinel 2 satellite during the date I selected (I know that the Sentinel-2 satellite takes every 5 days), additionally I do not know the exact date of each request, i.e., on what date each shot was taken.
My questions are as follows:
Is there any way to download all the available images that exist in the period indicated above?
How do I know which date each shot corresponds to?
I have reviewed some examples, such as the following:
[Where can I get a list of the available imagery dates for a specific area?]
[How can I get all the images from an area of interest in a desired time period?]
Attached is the code I am using:
evalscript_true_color = """
//VERSION=3
function setup() {
return {
input: [{
bands: ["B02", "B03", "B04"]
}],
output: {
bands: 3
}
};
}
function evaluatePixel(sample) {
return [sample.B04, sample.B03, sample.B02];
}
"""
start = datetime.datetime(2018, 1, 1)
end = datetime.datetime(2018, 1, 31)
n_chunks = 31
tdelta = (end - start) / n_chunks
edges = [(start + i * tdelta).date().isoformat() for i in range(n_chunks)]
slots = [(edges[i], edges[i + 1]) for i in range(len(edges) - 1)]
print("Monthly time windows:\n")
for slot in slots:
print(slot)
def get_true_color_request(time_interval, save_data=True):
return SentinelHubRequest(
data_folder=data_folder,
evalscript=evalscript_true_color,
input_data=[
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L1C,
time_interval=time_interval,
mosaicking_order=MosaickingOrder.LEAST_CC,
)
],
responses=[SentinelHubRequest.output_response("default", MimeType.PNG)],
bbox=betsiboka_bbox,
size=betsiboka_size,
config=config,
)
# create a list of requests
list_of_requests = [get_true_color_request(slot) for slot in slots]
list_of_requests = [request.download_list[0] for request in list_of_requests]
# download data with multiple threads
data = SentinelHubDownloadClient(config=config).download(list_of_requests, max_threads=5)
I appreciate any help or suggestions you can provide.