Skip to content

Commit 778d119

Browse files
committed
chore: FNF_Palsar handling to WMS
1 parent 755279c commit 778d119

File tree

2 files changed

+8
-33
lines changed

2 files changed

+8
-33
lines changed

src/eodash_catalog/endpoints.py

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,14 @@ def add_visualization_info(
11451145
"role": ["data"],
11461146
}
11471147
)
1148+
if collection_config.get("EodashIdentifier") == "FNF":
1149+
extra_fields.update(
1150+
{
1151+
"wms:layers": endpoint_config.get("LayerId", "").replace(
1152+
"{time}", (datetimes is not None and str(datetimes[0].year)) or "2020"
1153+
),
1154+
}
1155+
)
11481156
dimensions = {}
11491157
if dimensions_config := endpoint_config.get("Dimensions", {}):
11501158
for key, value in dimensions_config.items():
@@ -1218,28 +1226,6 @@ def add_visualization_info(
12181226
link,
12191227
)
12201228
stac_object.add_link(link)
1221-
elif endpoint_config["Name"] == "JAXA_WMTS_PALSAR":
1222-
target_url = "{}".format(endpoint_config.get("EndPoint"))
1223-
# custom time just for this special case as a default for collection wmts
1224-
time = None
1225-
if datetimes is not None:
1226-
time = datetimes[0]
1227-
extra_fields.update(
1228-
{
1229-
"wmts:layer": endpoint_config.get("LayerId", "").replace(
1230-
"{time}", (time and str(time.year)) or "2017"
1231-
)
1232-
}
1233-
)
1234-
stac_object.add_link(
1235-
Link(
1236-
rel="wmts",
1237-
target=target_url,
1238-
media_type="image/png",
1239-
title="wmts capabilities",
1240-
extra_fields=extra_fields,
1241-
)
1242-
)
12431229
elif endpoint_config["Name"] == "xcube":
12441230
if endpoint_config["Type"] == "zarr":
12451231
# either preset ColormapName of left as a template

src/eodash_catalog/generate_indicators.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -302,17 +302,6 @@ def process_collection_file(
302302
catalog,
303303
options,
304304
)
305-
elif endpoint_config["Name"] == "JAXA_WMTS_PALSAR":
306-
# somewhat one off creation of individual WMTS layers as individual items
307-
collection = handle_WMS_endpoint(
308-
catalog_config,
309-
endpoint_config,
310-
collection_config,
311-
coll_path_rel_to_root_catalog,
312-
catalog,
313-
options,
314-
wmts=True,
315-
)
316305
elif endpoint_config["Name"] == "Collection-only":
317306
collection = handle_collection_only(
318307
catalog_config, endpoint_config, collection_config, catalog

0 commit comments

Comments
 (0)