I want to get time series of data from sentinel hub using eo-learn. I have this piece of python code that works for S2 :
# import
from eolearn.io import S2L1CWCSInput
from eolearn.io.sentinelhub_service import SentinelHubOGCInput
from sentinelhub import BBox, CRS, ServiceType
from eolearn.core import EOTask, EOPatch, LinearWorkflow
# define task
input_task = S2L1CWCSInput(layer='1_TRUE_COLOR', resx='20m', resy='20m', maxcc=0.5, instance_id=INSTANCE_ID)
workflow = LinearWorkflow(input_task)
#BBox definition
bbox = BBox(bbox=[-1.8, 44.2, 1.7, 45.9], crs=CRS.WGS84)
# time interval definition
time_interval = ['2016-01-01','2019-3-1']
# execute the workflow
result = workflow.execute({
input_task: {
'bbox': bbox,
'time_interval': time_interval
},
})
I have tried to adapt it to S5P but I am failing to get it to work.
The overall code stays the same except the instance ID (another configuration where I have S5p) and the input task:
input_task = SentinelHubOGCInput(layer='CO', service_type = ServiceType.WCS,instance_id=INSTANCE_ID,data_source='Sentinel-5P')
The error I am getting comes from the parameter data_source : AttributeError: ‘str’ object has no attribute ‘value’ in file ‘constant.py’
Has anyone succeeded in making S5P work with eo-learn ?