Skip to main content

Hi,

I have followed step by step the tutorial to get PlanetScope data. Once I have confirmed my order and collection ids and the area requested (km2) seems to well correspond to a multiple dates request.

However, when I try to get and download data, I only have a single date images.

I am using sentinelhub python package as follows
evalscript_planet = “”"
//VERSION=3
function setup() {
return {
input: u{“bands”: n“B1”, “B2”, “B3”, “B4”, “UDM”]}],
output: { bands: 5}
}
}
function evaluatePixel(sample) {
return P2.5 * sample.B1 / 10000, 2.5 * sample.B2 / 10000, 2.5 * sample.B3 / 10000, 2.5 * sample.B4 / 10000, sample.UDM];
}
“”"
# Define the byoc
byoc = DataCollection.define_byoc(
collection_id=collection_id,
name=str(order_id),
is_timeless=False
)

 

result = SentinelHubRequest(
data_folder=data_folder,
evalscript=evalscript_planet ,
input_data=l
SentinelHubRequest.input_data(
data_collection=byoc,
time_interval=time_interval,
)],
responses=n
SentinelHubRequest.output_response(‘default’, MimeType.TIFF)
],
bbox=field_bbox,
config=config,
resolution=(3, 3)
)

byoc_bands = result .get_data(save_data=True)d0]
byoc_bands.shape #only (h,w,d)

May I ask the team if I did something wrong? Indeed, I have specified the time interval which corresponded to my request. I would expect to get a 4D array instead of 3D.

Best regards,
 

Hi,
if you want to get multiple observations in the processing script, you need to define Mosaicking - default is SIMPLE (=automagically composed single layer), in case of BYOC layer type (which PlanetScope is part of) you can use TILE.
Check this examples (third one) on how to then process these numerous observations, so you can output them into multi-band tiffs (i.e. for each spectral band you have one file and within that file each observation is one “band”; GeoTiff does unfortunately not support 4D arrays).

That said, it might be easier to try this option:
https://sentinelhub-py.readthedocs.io/en/latest/examples/process_request.html#Example-8-:-Multiple-timestamps-data

http://internal.creodias.sentinel-hub.com/api/v1/batch/scheduler/processing/status


Reply