I modified your example and combined it with another input task to but I am getting the error:
ValueError: During execution of task SentinelHubInputTask: Trying to write data to an existing eopatch with a different timestamp.
Each task is working on its own but chaining them produces the error.
EDIT : glc_task returns 1 in the first dimension and add_data returns 2. But I couldn’t figure out how to resolve it.
I feel like there is something basic that I am missing here.
Also, how is this working without a SHconfig object?
AOI = BBox(bbox=[5.60, 52.68, 5.75, 52.63], crs=CRS.WGS84)
time_interval = '2020-01-01', '2020-01-20'
glc = DataCollection.define(
name='Global Land Cover10m',
api_id='byoc-0b940c63-45dd-4e6b-8019-c3660b81b884', #Type
catalog_id='0b940c63-45dd-4e6b-8019-c3660b81b884', # collection_id
service_url='https://services.sentinel-hub.com', # End point
is_timeless=False,
bands=[
Band('Map', (Unit.DN,), (np.float32,)),
]
band_names = ['B02', 'B03', 'B04']
add_data = SentinelHubInputTask(
bands_feature=(FeatureType.DATA, 'BANDS'),
bands = band_names,
resolution=10,
maxcc=0.8,
time_difference=datetime.timedelta(minutes=120),
data_collection=DataCollection.SENTINEL2_L1C,
max_threads=5
)
glc_task = SentinelHubInputTask(
data_collection=glc,
size=bbox_to_dimensions(AOI, 200),
bands_feature=(FeatureType.DATA, 'glc'),
bands=['Map']
)
workflow = LinearWorkflow(glc_task,add_data)
result = workflow.execute({
add_data: {'bbox': AOI, 'time_interval': time_interval},
glc_task: {'bbox': AOI, 'time_interval': time_interval}
})