I selcted a 5x5 patch from the AOI and I wanted to download sentinel data to work with. I tried the following code:
band_names=['B02', 'B03', 'B04', 'B08', 'B11', 'B12']
add_data = SentinelHubInputTask(
bands_feature=(FeatureType.DATA, 'BANDS'),
bands = band_names,
resolution=10,
maxcc=0.2,
time_difference=datetime.timedelta(minutes=120),
data_source=DataSource.SENTINEL2_L1C,
additional_data=[(FeatureType.MASK, 'dataMask', 'IS_DATA'),
(FeatureType.MASK, 'CLM'),
(FeatureType.DATA, 'CLP')])
This is the Workflow:
workflow = LinearWorkflow(
add_data,
NDVI,
NDWI,
NDBI,
add_sh_valmask,
count_val_sh,
#rasterization_task,
save)
Executing the workflow:
time_interval = ['2019-01-01', '2019-12-31'] # time interval for the SH request
# define additional parameters of the workflow
execution_args = []
for idx, bbox in enumerate(bbox_list[patchIDs]):
execution_args.append({
add_data:{'bbox': bbox, 'time_interval': time_interval},
save: {'eopatch_folder': f'eopatch_{idx}'}
})
executor = EOExecutor(workflow, execution_args, save_logs=True)
executor.run(workers=12, multiprocess=False)
executor.make_report()
When I checked the result I found a folder with 25 txt files:
and each contain this:
I am supposed to get 25 eopatches. I don’t know what went wrong.
This is the html report:
Also:
So basically, from what I understand, it’s a problem related to these two:sh_client_id
: User’s OAuth client ID for Sentinel Hub servicesh_client_secret
: User’s OAuth client secret for Sentinel Hub service
But how can I fix this?
Note I have already got those info ( sh_client_id
and `sh_client_secret’ ) from my sentinelhub dashboard, but I still get the same error.