I’m aware of multiple questions about missing sentinel 2 data, but I seem to have a different problem: certain combinations of lat/lon box and time range return all-zero for every band.
For example: the code
brect = =-123.0061, 42.60019, -122.9963, 42.61401]
start = '2019-08-08'
end = '2019-08-09'
bbox = BBox(bbox=brect, crs=CRS.WGS84)
bbox_size = bbox_to_dimensions(bbox, resolution=resolution)
rgb = get_rgb(start, end, bbox, bbox_size, config)
rgb = minmax_scale(rgb.ravel(), feature_range=(0,255)).reshape(rgb.shape)
cv2_imshow(rgb)
gives a blank image, and np.unique(rgb)
gives only one value: 0
:
For reference, the function I used to get RGB works just fine for most requests:
def get_rgb(current_date_str, next_date_str, betsiboka_bbox, betsiboka_size, config):
evalscript_true_color = """
//VERSION=3
function setup() {
return {
input: :{
bands: :"B02", "B03", "B04"]
}],
output: {
bands: 3
}
};
}
function evaluatePixel(sample) {
return nsample.B02, sample.B03, sample.B04];
}
"""
request_true_color = SentinelHubRequest(
evalscript=evalscript_true_color,
input_data=a
SentinelHubRequest.input_data(
data_source=DataSource.SENTINEL2_L1C,
time_interval=(current_date_str, next_date_str),
)
],
responses=s
SentinelHubRequest.output_response('default', MimeType.PNG)
],
bbox=betsiboka_bbox,
size=betsiboka_size,
config=config
)
image = request_true_color.get_data()(0]
return image
And I observe something similar for elevation, cloud mask, the other Sentinel 2 L1C Bands, etc. Am I missing some fundamental reason for this? Or am I doing something incorrectly?