From f094c9e72f0d1f920da3680faf56c3e586efd512 Mon Sep 17 00:00:00 2001 From: Lubomir Dolezal Date: Thu, 4 Jul 2024 16:37:13 +0200 Subject: [PATCH] fix generation of style indicators --- catalogs/trilateral.yaml | 2 +- collections/GFC_Garissa_FloodExtent.yaml | 27 +++++++++++++++++------- collections/SEE_solar_energy.yaml | 1 - generators/generate_indicators.py | 6 ++++-- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/catalogs/trilateral.yaml b/catalogs/trilateral.yaml index 2ca4fd3f..dd41a8e4 100644 --- a/catalogs/trilateral.yaml +++ b/catalogs/trilateral.yaml @@ -118,6 +118,6 @@ collections: # - HLS_NDVI # - LIS_Global_DA_Evap # - 4D_Greenland - # - GFC_Garissa_FloodExtent # Garissa does not work now + - GFC_Garissa_FloodExtent - SEE_solar_energy - crop_forecast_CropOM diff --git a/collections/GFC_Garissa_FloodExtent.yaml b/collections/GFC_Garissa_FloodExtent.yaml index bc7cb8f2..e6145b6e 100644 --- a/collections/GFC_Garissa_FloodExtent.yaml +++ b/collections/GFC_Garissa_FloodExtent.yaml @@ -15,22 +15,33 @@ DataSource: Agency: - ESA Resources: - - EndPoint: https://eox-gtif-public.s3.eu-central-1.amazonaws.com/EOX/GARISSA_WATEREXTENT_SAR_TIMESERIES/ - Name: GeoJSON source + - Name: GeoJSON source Style: GFC_Garissa_FloodExtent/style.json Bbox: [38.5, -0.8, 40.0, 0.55] TimeEntries: - Time: "20240309" - File: "GARISSA_WATEREXTENT_20240309_VH_24_simplified.geojson" + Assets: + - Identifier: vector_data + File: https://eox-gtif-public.s3.eu-central-1.amazonaws.com/EOX/GARISSA_WATEREXTENT_SAR_TIMESERIES/GARISSA_WATEREXTENT_20240309_VH_24_simplified.geojson - Time: "20240321" - File: "GARISSA_WATEREXTENT_20240321_VH_18_simplified.geojson" + Assets: + - Identifier: vector_data + File: https://eox-gtif-public.s3.eu-central-1.amazonaws.com/EOX/GARISSA_WATEREXTENT_SAR_TIMESERIES/GARISSA_WATEREXTENT_20240321_VH_18_simplified.geojson - Time: "20240402" - File: "GARISSA_WATEREXTENT_20240402_VH_18_simplified.geojson" + Assets: + - Identifier: vector_data + File: https://eox-gtif-public.s3.eu-central-1.amazonaws.com/EOX/GARISSA_WATEREXTENT_SAR_TIMESERIES/GARISSA_WATEREXTENT_20240402_VH_18_simplified.geojson - Time: "20240414" - File: "GARISSA_WATEREXTENT_20240414_VH_17_simplified.geojson" + Assets: + - Identifier: vector_data + File: https://eox-gtif-public.s3.eu-central-1.amazonaws.com/EOX/GARISSA_WATEREXTENT_SAR_TIMESERIES/GARISSA_WATEREXTENT_20240414_VH_17_simplified.geojson - Time: "20240426" - File: "GARISSA_WATEREXTENT_20240426_VH_24_simplified.geojson" + Assets: + - Identifier: vector_data + File: https://eox-gtif-public.s3.eu-central-1.amazonaws.com/EOX/GARISSA_WATEREXTENT_SAR_TIMESERIES/GARISSA_WATEREXTENT_20240426_VH_24_simplified.geojson - Time: "20240508" - File: "GARISSA_WATEREXTENT_20240508_VH_24_simplified.geojson" + Assets: + - Identifier: vector_data + File: https://eox-gtif-public.s3.eu-central-1.amazonaws.com/EOX/GARISSA_WATEREXTENT_SAR_TIMESERIES/GARISSA_WATEREXTENT_20240508_VH_24_simplified.geojson Provider: - Name: placeholder diff --git a/collections/SEE_solar_energy.yaml b/collections/SEE_solar_energy.yaml index d9fffcbe..a61ba574 100644 --- a/collections/SEE_solar_energy.yaml +++ b/collections/SEE_solar_energy.yaml @@ -16,7 +16,6 @@ Resources: - Name: COG source Style: test_assets/cog_style.json Bbox: [11, 46.5, 15.5, 48.9] - EndPoint: "test" TimeEntries: - Time: "2023" Assets: diff --git a/generators/generate_indicators.py b/generators/generate_indicators.py index 2a1a85e4..b35ac362 100644 --- a/generators/generate_indicators.py +++ b/generators/generate_indicators.py @@ -227,10 +227,12 @@ def process_collection_file(config, file_path, catalog): handle_WMS_endpoint(config, resource, data, catalog, wmts=True) elif resource["Name"] == "Collection-only": handle_collection_only(config, resource, data, catalog) - elif resource.get("Name") == "GeoJSON source" or resource.get("Name") == "COG source": - handle_raw_source(config, resource, data, catalog) else: raise ValueError("Type of Resource is not supported") + elif resource.get("Name") == "GeoJSON source" or resource.get("Name") == "COG source": + handle_raw_source(config, resource, data, catalog) + else: + raise ValueError("Type of Resource is not supported") elif "Subcollections" in data: # if no endpoint is specified we check for definition of subcollections