Using world cover as mask timeless in eoworkflow

Hi @tonish,

The example below shows how you define new DataCollection using information from SH collections web page, and create SentinelHubInputTask that you can then add to your workflow.

from sentinelhub import (
    BBox, CRS, bbox_to_dimensions, 
    DataCollection, Band, Unit
)

from eolearn.core import EOPatch, FeatureType
from eolearn.io import SentinelHubInputTask

import matplotlib.pyplot as plt
import datetime as dt
import numpy as np

caspian_sea_bbox = BBox([49.9604, 44.7176, 51.0481, 45.2324], crs=CRS.WGS84)
time_interval = '2015-03-10', '2020-05-01'

glc = DataCollection.define(
    name='Global Land Cover, forest',
    api_id='byoc-f0a97620-0e88-4c1f-a1ac-bb388fabdf2c', # type 
    catalog_id='f0a97620-0e88-4c1f-a1ac-bb388fabdf2c',  # collectionId
    service_url='https://creodias.sentinel-hub.com',    # end point
    is_timeless=False,
    bands=[
        Band('Forest_Type_layer', (Unit.DN,), (np.float32,)),
        Band('Tree_CoverFraction_layer', (Unit.DN,), (np.float32,)),
    ]
)

input_task = SentinelHubInputTask(
    data_collection=glc,
    size=bbox_to_dimensions(caspian_sea_bbox, 200),
    bands_feature=(FeatureType.DATA, 'glc'),
    bands=['Forest_Type_layer']
)

eop = input_task.execute(bbox=caspian_sea_bbox, time_interval=time_interval)

The caveat is that the SentinelHubInputTask wants the results to be written to FeatureType.DATA, so you might have to create new Task that takes the particular time out of results and returns it as FeatureType.MASK_TIMELESS. Let us know if you run into additional troubles.