eodash_catalog 0.0.17__py3-none-any.whl → 0.0.18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of eodash_catalog might be problematic. Click here for more details.
- eodash_catalog/__about__.py +1 -1
- eodash_catalog/generate_indicators.py +28 -26
- eodash_catalog/stac_handling.py +3 -3
- {eodash_catalog-0.0.17.dist-info → eodash_catalog-0.0.18.dist-info}/METADATA +1 -1
- {eodash_catalog-0.0.17.dist-info → eodash_catalog-0.0.18.dist-info}/RECORD +8 -8
- {eodash_catalog-0.0.17.dist-info → eodash_catalog-0.0.18.dist-info}/WHEEL +0 -0
- {eodash_catalog-0.0.17.dist-info → eodash_catalog-0.0.18.dist-info}/entry_points.txt +0 -0
- {eodash_catalog-0.0.17.dist-info → eodash_catalog-0.0.18.dist-info}/licenses/LICENSE.txt +0 -0
eodash_catalog/__about__.py
CHANGED
|
@@ -88,6 +88,8 @@ def process_catalog_file(file_path: str, options: Options):
|
|
|
88
88
|
)
|
|
89
89
|
else:
|
|
90
90
|
print(f"Warning: neither collection nor indicator found for {collection}")
|
|
91
|
+
if "MapProjection" in catalog_config:
|
|
92
|
+
catalog.extra_fields["eodash:mapProjection"] = catalog_config["MapProjection"]
|
|
91
93
|
|
|
92
94
|
strategy = TemplateLayoutStrategy(item_template="${collection}/${year}")
|
|
93
95
|
# expecting that the catalog will be hosted online, self url should correspond to that
|
|
@@ -196,64 +198,64 @@ def process_collection_file(
|
|
|
196
198
|
with open(file_path) as f:
|
|
197
199
|
collection_config: dict = yaml.load(f, Loader=SafeLoader)
|
|
198
200
|
if "Resources" in collection_config:
|
|
199
|
-
for
|
|
201
|
+
for endpoint_config in collection_config["Resources"]:
|
|
200
202
|
collection = None
|
|
201
|
-
if
|
|
203
|
+
if endpoint_config["Name"] == "Sentinel Hub":
|
|
202
204
|
collection = handle_SH_endpoint(
|
|
203
|
-
catalog_config,
|
|
205
|
+
catalog_config, endpoint_config, collection_config, catalog, options
|
|
204
206
|
)
|
|
205
|
-
elif
|
|
207
|
+
elif endpoint_config["Name"] == "Sentinel Hub WMS":
|
|
206
208
|
collection = handle_SH_WMS_endpoint(
|
|
207
|
-
catalog_config,
|
|
209
|
+
catalog_config, endpoint_config, collection_config, catalog
|
|
208
210
|
)
|
|
209
|
-
elif
|
|
211
|
+
elif endpoint_config["Name"] == "GeoDB":
|
|
210
212
|
collection = handle_GeoDB_endpoint(
|
|
211
|
-
catalog_config,
|
|
213
|
+
catalog_config, endpoint_config, collection_config, catalog
|
|
212
214
|
)
|
|
213
|
-
elif
|
|
215
|
+
elif endpoint_config["Name"] == "VEDA":
|
|
214
216
|
collection = handle_VEDA_endpoint(
|
|
215
|
-
catalog_config,
|
|
217
|
+
catalog_config, endpoint_config, collection_config, catalog, options
|
|
216
218
|
)
|
|
217
|
-
elif
|
|
219
|
+
elif endpoint_config["Name"] == "marinedatastore":
|
|
218
220
|
collection = handle_WMS_endpoint(
|
|
219
|
-
catalog_config,
|
|
221
|
+
catalog_config, endpoint_config, collection_config, catalog, wmts=True
|
|
220
222
|
)
|
|
221
|
-
elif
|
|
223
|
+
elif endpoint_config["Name"] == "xcube":
|
|
222
224
|
collection = handle_xcube_endpoint(
|
|
223
|
-
catalog_config,
|
|
225
|
+
catalog_config, endpoint_config, collection_config, catalog
|
|
224
226
|
)
|
|
225
|
-
elif
|
|
227
|
+
elif endpoint_config["Name"] == "WMS":
|
|
226
228
|
collection = handle_WMS_endpoint(
|
|
227
|
-
catalog_config,
|
|
229
|
+
catalog_config, endpoint_config, collection_config, catalog
|
|
228
230
|
)
|
|
229
|
-
elif
|
|
231
|
+
elif endpoint_config["Name"] == "JAXA_WMTS_PALSAR":
|
|
230
232
|
# somewhat one off creation of individual WMTS layers as individual items
|
|
231
233
|
collection = handle_WMS_endpoint(
|
|
232
|
-
catalog_config,
|
|
234
|
+
catalog_config, endpoint_config, collection_config, catalog, wmts=True
|
|
233
235
|
)
|
|
234
|
-
elif
|
|
236
|
+
elif endpoint_config["Name"] == "Collection-only":
|
|
235
237
|
collection = handle_collection_only(
|
|
236
|
-
catalog_config,
|
|
238
|
+
catalog_config, endpoint_config, collection_config, catalog
|
|
237
239
|
)
|
|
238
|
-
elif
|
|
240
|
+
elif endpoint_config["Name"] == "Custom-Endpoint":
|
|
239
241
|
collection = handle_custom_endpoint(
|
|
240
242
|
catalog_config,
|
|
241
|
-
|
|
243
|
+
endpoint_config,
|
|
242
244
|
collection_config,
|
|
243
245
|
catalog,
|
|
244
246
|
)
|
|
245
|
-
elif
|
|
247
|
+
elif endpoint_config["Name"] in ["COG source", "GeoJSON source"]:
|
|
246
248
|
collection = handle_raw_source(
|
|
247
|
-
catalog_config,
|
|
249
|
+
catalog_config, endpoint_config, collection_config, catalog
|
|
248
250
|
)
|
|
249
251
|
else:
|
|
250
252
|
raise ValueError("Type of Resource is not supported")
|
|
251
253
|
if collection:
|
|
252
254
|
add_single_item_if_collection_empty(collection)
|
|
253
|
-
add_projection_info(
|
|
254
|
-
add_to_catalog(collection, catalog,
|
|
255
|
+
add_projection_info(endpoint_config, collection)
|
|
256
|
+
add_to_catalog(collection, catalog, endpoint_config, collection_config)
|
|
255
257
|
else:
|
|
256
|
-
raise Exception(f"No collection was generated for resource {
|
|
258
|
+
raise Exception(f"No collection was generated for resource {endpoint_config}")
|
|
257
259
|
elif "Subcollections" in collection_config:
|
|
258
260
|
# if no endpoint is specified we check for definition of subcollections
|
|
259
261
|
parent_collection = get_or_create_collection(
|
eodash_catalog/stac_handling.py
CHANGED
|
@@ -347,7 +347,7 @@ def add_base_overlay_info(
|
|
|
347
347
|
collection.add_link(create_web_map_link(layer, role="overlay"))
|
|
348
348
|
|
|
349
349
|
|
|
350
|
-
def add_extra_fields(stac_object: Collection |
|
|
350
|
+
def add_extra_fields(stac_object: Collection | Link, collection_config: dict) -> None:
|
|
351
351
|
if "yAxis" in collection_config:
|
|
352
352
|
stac_object.extra_fields["yAxis"] = collection_config["yAxis"]
|
|
353
353
|
if "Themes" in collection_config:
|
|
@@ -379,7 +379,7 @@ def add_extra_fields(stac_object: Collection | Catalog | Link, collection_config
|
|
|
379
379
|
if "Other" in collection_config["DataSource"]:
|
|
380
380
|
stac_object.extra_fields["otherSources"] = collection_config["DataSource"]["Other"]
|
|
381
381
|
if "MapProjection" in collection_config:
|
|
382
|
-
stac_object.extra_fields["mapProjection"] = collection_config["MapProjection"]
|
|
382
|
+
stac_object.extra_fields["eodash:mapProjection"] = collection_config["MapProjection"]
|
|
383
383
|
|
|
384
384
|
|
|
385
385
|
def get_collection_times_from_config(endpoint_config: dict) -> list[str]:
|
|
@@ -416,6 +416,6 @@ def add_projection_info(
|
|
|
416
416
|
# so we are taking over the DataProjection as is and deal with it in the eodash client
|
|
417
417
|
# in a non-standard compliant way
|
|
418
418
|
# https://github.com/proj4js/proj4js/issues/400
|
|
419
|
-
stac_object.extra_fields["proj4_def"] = proj
|
|
419
|
+
stac_object.extra_fields["eodash:proj4_def"] = proj
|
|
420
420
|
else:
|
|
421
421
|
raise Exception(f"Incorrect type of proj definition {proj}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: eodash_catalog
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.18
|
|
4
4
|
Summary: This package is intended to help create a compatible STAC catalog for the eodash dashboard client. It supports configuration of multiple endpoint types for information extraction.
|
|
5
5
|
Project-URL: Documentation, https://github.com/eodash/eodash_catalog#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/eodash/eodash_catalog/issues
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
eodash_catalog/__about__.py,sha256=
|
|
1
|
+
eodash_catalog/__about__.py,sha256=qhKAhTix1N8_dYJ9ebFANzydGLRaBuHbCEZSda-fBeE,138
|
|
2
2
|
eodash_catalog/__init__.py,sha256=_W_9emPYf6FUqc0P8L2SmADx6hGSd7PlQV3yRmCk5uM,115
|
|
3
3
|
eodash_catalog/duration.py,sha256=B6XOZfvNU7SuqpxuVtT1kNKODoOQJXDI6mocvA_U1ik,10816
|
|
4
4
|
eodash_catalog/endpoints.py,sha256=hL9rxeGcBpRr6wj6lcKxX7NtkLjP1auzwnt7zJjYVUo,33714
|
|
5
|
-
eodash_catalog/generate_indicators.py,sha256=
|
|
5
|
+
eodash_catalog/generate_indicators.py,sha256=Fxq3sAXzZaPpE_RhiyFlnIvUBmf17tVFpoN2R_xLFGM,19109
|
|
6
6
|
eodash_catalog/sh_endpoint.py,sha256=F99LpYT-MGhPiwdSSysm3xBTjaQBXRUkieh-q-vhTvE,1012
|
|
7
|
-
eodash_catalog/stac_handling.py,sha256=
|
|
7
|
+
eodash_catalog/stac_handling.py,sha256=sN-B2jTQZyQFhs7nvszI5n3qvsHqKoAXbxjyIaHpQmM,18201
|
|
8
8
|
eodash_catalog/thumbnails.py,sha256=31Wk38oNQDxfhSUbMLBpHuZFhsR8v_7luYr65XQtDf0,2213
|
|
9
9
|
eodash_catalog/utils.py,sha256=44V-Pm9tl70nWahMPE4vl-9FzZbRkMVRQPdINdG_8F8,8975
|
|
10
|
-
eodash_catalog-0.0.
|
|
11
|
-
eodash_catalog-0.0.
|
|
12
|
-
eodash_catalog-0.0.
|
|
13
|
-
eodash_catalog-0.0.
|
|
14
|
-
eodash_catalog-0.0.
|
|
10
|
+
eodash_catalog-0.0.18.dist-info/METADATA,sha256=N-kEMopvt8_0J_3S2a9tRFCNZKKuXWm5abbidXMO7SY,3203
|
|
11
|
+
eodash_catalog-0.0.18.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
12
|
+
eodash_catalog-0.0.18.dist-info/entry_points.txt,sha256=kuUQrDG1PtYd8kPjf5XM6H_NtQd9Ozwl0jjiGtAvZSM,87
|
|
13
|
+
eodash_catalog-0.0.18.dist-info/licenses/LICENSE.txt,sha256=oJCW5zQxnFD-J0hGz6Zh5Lkpdk1oAndmWhseTmV224E,1107
|
|
14
|
+
eodash_catalog-0.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|