Hi everyone,
I was importing and creating EO Patches the following way.
Defined input_task as:input_task = S2L1CWCSInput(layer = 'BANDS-S2-L1C',resx='10m', resy='10m', maxcc=1.0)
And then later used it in:
# define workflow
workflow=LinearWorkflow(input_task, true_color, add_ndvi, add_ndwi, add_fdi, cloud_classifier_task, water_detection, combine_mask, save)
# run workflow
result = workflow.execute({input_task: {'bbox': bbox, 'time_interval': time_interval},
save: {'eopatch_folder': 'eopatch'}})
patch = result.eopatch()
return patch
Which was used in a loop to get many patches in an area, therefore providing a specific bbox each time.
I paused working on the project for a couple of weeks (didn’t change anything) and it feels like everything has fallen apart. S2L1CWCSInput
no longer loads from eo-learn. I figured there’s also WcsRequest
, so I changed my code to define input_task within my loop the following way:
# input task
# PROBLEM HAPPENS HERE!
input_task = WcsRequest(data_collection=DataCollection.SENTINEL2_L1C, layer = 'BANDS-S2-L1C', bbox=bbox, resx='10m', resy='10m', maxcc=1.0, time=time_interval)
print(bbox)
# define workflow
workflow=LinearWorkflow(input_task, save)
# run workflow
result = workflow.execute({save: {'eopatch_folder': 'eopatch'}})
patch = result.eopatch()
return patch
However, this doesn’t seem to work. The problem definitely seems to be with input_task, since my loop quits there (doesn’t print anything after that), but I’m not quite sure as I’m not getting an error message.
Am I using this totally incorrectly? Apologies if this is a basic question.
I’ve been banging my head against the wall on how exactly to modify and fix this… thought I would ask. Any helpful pointers would be much appreciated!!
Thank you very much in advance!!
Anna