Skip to content

Commit 936bde3

Browse files
author
Alin BUTU
committed
review remarks correction
1 parent e3b1a6e commit 936bde3

File tree

5 files changed

+203
-137
lines changed

5 files changed

+203
-137
lines changed

services/adgs/rs_server_adgs/adgs_utils.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import stac_pydantic
2626
import yaml
2727
from fastapi import HTTPException, status
28-
from rs_server_common.utils.utils import map_stac_platform
28+
from rs_server_common.utils.utils import reverse_adgs_prip_map_mission
2929

3030
ADGS_CONFIG = Path(osp.realpath(osp.dirname(__file__))).parent / "config"
3131
search_yaml = ADGS_CONFIG / "adgs_search_config.yaml"
@@ -86,29 +86,10 @@ def serialize_adgs_asset(feature_collection, products):
8686
return feature_collection
8787

8888

89-
def adgs_reverse_map_mission(
90-
platform: str | None,
91-
constellation: str | None,
92-
) -> tuple[str | None, str | None]:
93-
"""Function used to re-map platform and constellation based on satellite value."""
94-
if not (constellation or platform):
95-
return None, None
96-
97-
if constellation:
98-
constellation = constellation.lower() # type: ignore
99-
100-
for satellite in map_stac_platform()["satellites"]:
101-
for key, info in satellite.items():
102-
# Check for matching serialid and constellation
103-
if info.get("serialid") == platform and info.get("constellation").lower() == constellation:
104-
return key, info.get("constellation")
105-
return None, None
106-
107-
10889
def prepare_collection(collection: stac_pydantic.ItemCollection) -> stac_pydantic.ItemCollection:
10990
"""Used to create a more complex mapping on platform/constallation from odata to stac."""
11091
for feature in collection.features:
111-
feature.properties.platform, feature.properties.constellation = adgs_reverse_map_mission(
92+
feature.properties.platform, feature.properties.constellation = reverse_adgs_prip_map_mission(
11293
feature.properties.platform,
11394
feature.properties.constellation,
11495
)

services/prip/config/prip_search_config.template.yaml

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 CS Group
1+
# Copyright 2025 CS Group
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -33,8 +33,8 @@ template:
3333
title: "Legal notice on the use of Copernicus Sentinel Data and Service Information"
3434
type: "application/pdf"
3535
- rel: describedby
36-
href: "https://sentiwiki.copernicus.eu/web/copernicus-operations#CopernicusOperations-AuxiliaryDataGathering"
37-
title: "Auxiliary Data"
36+
href: "https://sentiwiki.copernicus.eu/web/copernicus-operations#CopernicusOperations-SystematicProduction"
37+
title: "Production Service"
3838
type: "text/html"
3939
providers:
4040
- name: "European Union/ESA/Copernicus"
@@ -51,21 +51,42 @@ collections:
5151

5252
# All stations deployed in the CS cluster, without queries
5353

54-
- id: adgs
55-
station: adgs
56-
title: "All from 'adgs' station"
57-
description: "All from 'adgs' station"
54+
- id: s1a
55+
station: s1a
56+
title: "All from 's1a' station"
57+
description: "All from 's1a' station"
5858

59-
- id: adgs2
60-
station: adgs2
61-
title: "All from 'adgs2' station"
62-
description: "All from 'adgs2' station"
59+
- id: s2b
60+
station: s2b
61+
title: "All from 's2b' station"
62+
description: "All from 's2b' station"
6363

6464
# Idem with one collection per product type
6565

66-
- id: adgs_aux_pp2
67-
station: adgs
66+
- id: S1A_L0_IW_RAW
67+
station: s1a
6868
query:
69-
productType: AUX_PP2
70-
title: "AUX_PP2 'adgs' station"
71-
description: "AUX_PP2 'adgs' station"
69+
productType: IW_RAW__0N
70+
title: "s1a 'prip' station"
71+
description: "s1a 'prip' station"
72+
73+
- id: S2B_L0_DS
74+
station: s2b
75+
query:
76+
productType: OPER_MSI
77+
title: "s2b 'prip' station"
78+
description: "s2b 'prip' station"
79+
80+
- id: S2B_L0_GR
81+
station: s2b
82+
query:
83+
productType: OPER_MSI_L0
84+
title: "S2B_L0_GR 'prip' station"
85+
description: "S2B_L0_GR 'prip' station"
86+
87+
- id: S2B_L2A_TL
88+
station: s2b
89+
query:
90+
productType: OPER_MSI_L2A
91+
title: "S2B_L2A_TL 'prip' station"
92+
description: "S2B_L2A_TL 'prip' station"

services/prip/config/prip_search_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 CS Group
1+
# Copyright 2025 CS Group
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)