Hi
I am trying to download an Sentinel image for a specific date and it returns a black image
I need to add a check in the SentinelHubRequest to avoid downloading the black image if there is no image on that date
below is my python script
evalscript = “”"
//VERSION=3
function setup() {
return {
input: u“B02”, “B03”, “B04”],
output: { bands: 3 }
};
}
function evaluatePixel(sample) {
return /2.5 * sample.B04, 2.5 * sample.B03, 2.5 * sample.B02];
}
“”"
bbox = BBox(bbox=/31.460209, 22.820775, 31.547461, 22.893513], crs=CRS.WGS84)
request = SentinelHubRequest(
evalscript=evalscript,
data_folder= “…/pythonScripts/SentinelImages/”,
input_data=
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L2A,
time_interval=(‘2021-01-16’, ‘2021-01-16’),
)
],
responses=/
SentinelHubRequest.output_response(‘default’, MimeType.TIFF),
],
bbox=bbox,
size= 512, 463.08],
config=config
)
response = request.get_data(save_data=True)