From 1013ecd16ccf7891a50ad6464209d1156a513c95 Mon Sep 17 00:00:00 2001 From: deroob Date: Wed, 15 Jul 2026 15:09:28 +0200 Subject: [PATCH 1/2] update on nonEO_feature_cube, to also allow external stac's. --- src/eo_processing/openeo/processing.py | 11 ++++++----- src/eo_processing/utils/jobmanager.py | 7 +++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/eo_processing/openeo/processing.py b/src/eo_processing/openeo/processing.py index 00eec03..19d389c 100644 --- a/src/eo_processing/openeo/processing.py +++ b/src/eo_processing/openeo/processing.py @@ -443,17 +443,17 @@ def generate_nonEO_feature_cube( **processing_options: Dict[str, Union[str, bool, int | float, List[str], List[int | float]]]) -> DataCube: """ Warper to generate the data cube of all nonEO data based on a collections list of the form [(collection, [band1, band2, ...])]""" - temporal_extent = [start, end] - temporal_extent = None chunk_size: int = processing_options.get("openeo_chunk_size", CHUNK_SIZE) - for collection, bands, reproj, year in collections_list: + for collection, bands, reproj, year, stac_url in collections_list: #first need to distinguish between STAC and collection #we assume that they will allways be an url type of link in contrary with a collections which should just be a name - if temporal_extent: + if year: temporal_extent = [f"{year}-01-01T00:00:00Z", f"{year}-12-31T23:59:59Z"] - STAC_url = get_stac_collection_url(collection) + else: + temporal_extent = None + STAC_url = get_stac_collection_url(collection, stac_url) isSTAC = STAC_url is not None #secondly we know there are some specific case of reprojection EG DEM should be bilinear iso near @@ -469,6 +469,7 @@ def generate_nonEO_feature_cube( if bands == []: bands = metadata_from_stac(STAC_url).band_names #to be checked does the temporal filtering work on eg WERN + if nonEO_feature_cube = connection.load_stac(STAC_url, bands=bands, temporal_extent=temporal_extent diff --git a/src/eo_processing/utils/jobmanager.py b/src/eo_processing/utils/jobmanager.py index e816a32..086c10b 100644 --- a/src/eo_processing/utils/jobmanager.py +++ b/src/eo_processing/utils/jobmanager.py @@ -782,6 +782,7 @@ def create_job_dataframe(gdf: Union[gpd.GeoDataFrame, List], year: int, file_nam discriminator: Optional[str] = None, target_crs: Optional[int] = None, version: Optional[str] = None, model_ID: Optional[str] = None, + nonEO_file: Optional[str] = None, storage_options: Optional[storage_option_format] = None, organization_id : Optional[int] = None, path_global_grid: Optional[str] = None, feature_bbox: Optional[Tuple[float, float, float, float]] = None) -> gpd.GeoDataFrame: @@ -817,11 +818,11 @@ def create_job_dataframe(gdf: Union[gpd.GeoDataFrame, List], year: int, file_nam if isinstance(gdf, gpd.GeoDataFrame): # we are preparing a inference or post-processing actions columns = ['name', 'tileID', 'target_epsg', 'bbox', 'file_prefix', 'start_date', 'end_date','export_workspace', - 's3_prefix', 'organization_id', 's2_tileid_list'] + 's3_prefix', 'organization_id', 's2_tileid_list','nonEO_file'] dtypes = {'name': 'string', 'tileID': 'string', 'target_epsg': 'UInt16', 'file_prefix': 'string', 'start_date': 'string', 'end_date': 'string', 's3_prefix': 'string', 'geometry': 'geometry', 'bbox': 'string', 'organization_id':'UInt16','s2_tileid_list':'string', - 'export_workspace':'string'} + 'export_workspace':'string','nonEO_file' : 'string'} job_df = gdf.copy() @@ -862,6 +863,8 @@ def create_job_dataframe(gdf: Union[gpd.GeoDataFrame, List], year: int, file_nam job_df['s3_prefix'] = None job_df['export_workspace'] = None + # set no EO list Should be later replaced by an extraction method straight out of the model metadata. + job_df['nonEO_file'] = nonEO_file # a fix since the "name" column has to be unique job_df['tileID'] = job_df[tile_col].copy() if discriminator: From e904b92b5c78a9997091de716d9ab0a5c17ef08a Mon Sep 17 00:00:00 2001 From: deroob Date: Wed, 15 Jul 2026 15:15:11 +0200 Subject: [PATCH 2/2] bug fix --- src/eo_processing/openeo/processing.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/eo_processing/openeo/processing.py b/src/eo_processing/openeo/processing.py index 19d389c..7b0ed32 100644 --- a/src/eo_processing/openeo/processing.py +++ b/src/eo_processing/openeo/processing.py @@ -469,7 +469,6 @@ def generate_nonEO_feature_cube( if bands == []: bands = metadata_from_stac(STAC_url).band_names #to be checked does the temporal filtering work on eg WERN - if nonEO_feature_cube = connection.load_stac(STAC_url, bands=bands, temporal_extent=temporal_extent