eodash_catalog 0.0.32__py3-none-any.whl → 0.0.34__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/endpoints.py +26 -7
- {eodash_catalog-0.0.32.dist-info → eodash_catalog-0.0.34.dist-info}/METADATA +3 -3
- {eodash_catalog-0.0.32.dist-info → eodash_catalog-0.0.34.dist-info}/RECORD +7 -7
- {eodash_catalog-0.0.32.dist-info → eodash_catalog-0.0.34.dist-info}/WHEEL +0 -0
- {eodash_catalog-0.0.32.dist-info → eodash_catalog-0.0.34.dist-info}/entry_points.txt +0 -0
- {eodash_catalog-0.0.32.dist-info → eodash_catalog-0.0.34.dist-info}/licenses/LICENSE.txt +0 -0
eodash_catalog/__about__.py
CHANGED
eodash_catalog/endpoints.py
CHANGED
|
@@ -93,7 +93,10 @@ def process_STAC_Datacube_Endpoint(
|
|
|
93
93
|
unit = variables.get(endpoint_config.get("Variable")).get("unit")
|
|
94
94
|
if unit and "yAxis" not in collection_config:
|
|
95
95
|
collection_config["yAxis"] = unit
|
|
96
|
-
|
|
96
|
+
if datetimes:
|
|
97
|
+
collection.update_extent_from_items()
|
|
98
|
+
else:
|
|
99
|
+
LOGGER.warn(f"NO datetimes returned for collection: {collection_id}!")
|
|
97
100
|
|
|
98
101
|
add_collection_information(catalog_config, collection, collection_config)
|
|
99
102
|
|
|
@@ -188,8 +191,9 @@ def process_STACAPI_Endpoint(
|
|
|
188
191
|
) -> Collection:
|
|
189
192
|
if headers is None:
|
|
190
193
|
headers = {}
|
|
194
|
+
collection_id = endpoint_config["CollectionId"]
|
|
191
195
|
collection = get_or_create_collection(
|
|
192
|
-
catalog,
|
|
196
|
+
catalog, collection_id, collection_config, catalog_config, endpoint_config
|
|
193
197
|
)
|
|
194
198
|
datetime_query = ["1900-01-01T00:00:00Z", "3000-01-01T00:00:00Z"]
|
|
195
199
|
if query := endpoint_config.get("Query"):
|
|
@@ -202,13 +206,15 @@ def process_STACAPI_Endpoint(
|
|
|
202
206
|
if bbox is None:
|
|
203
207
|
bbox = [-180, -90, 180, 90]
|
|
204
208
|
results = api.search(
|
|
205
|
-
collections=[
|
|
209
|
+
collections=[collection_id],
|
|
206
210
|
bbox=bbox,
|
|
207
211
|
datetime=datetime_query, # type: ignore
|
|
208
212
|
)
|
|
209
213
|
# We keep track of potential duplicate times in this list
|
|
210
214
|
added_times = {}
|
|
215
|
+
any_item_added = False
|
|
211
216
|
for item in results.items():
|
|
217
|
+
any_item_added = True
|
|
212
218
|
item_datetime = item.get_datetime()
|
|
213
219
|
if item_datetime is not None:
|
|
214
220
|
iso_date = item_datetime.isoformat()[:10]
|
|
@@ -268,8 +274,13 @@ def process_STACAPI_Endpoint(
|
|
|
268
274
|
endpoint_config,
|
|
269
275
|
item,
|
|
270
276
|
)
|
|
271
|
-
|
|
272
|
-
|
|
277
|
+
if any_item_added:
|
|
278
|
+
collection.update_extent_from_items()
|
|
279
|
+
else:
|
|
280
|
+
LOGGER.warn(
|
|
281
|
+
f"""NO items returned for
|
|
282
|
+
bbox: {bbox}, datetime: {datetime_query}, collection: {collection_id}!"""
|
|
283
|
+
)
|
|
273
284
|
# replace SH identifier with catalog identifier
|
|
274
285
|
collection.id = collection_config["Name"]
|
|
275
286
|
add_collection_information(catalog_config, collection, collection_config)
|
|
@@ -365,7 +376,10 @@ def handle_SH_WMS_endpoint(
|
|
|
365
376
|
link.extra_fields["latlng"] = latlng
|
|
366
377
|
link.extra_fields["country"] = location["Country"]
|
|
367
378
|
link.extra_fields["city"] = location["Name"]
|
|
368
|
-
|
|
379
|
+
if location["Times"]:
|
|
380
|
+
collection.update_extent_from_items()
|
|
381
|
+
else:
|
|
382
|
+
LOGGER.warn(f"NO datetimes configured for collection: {collection_config['Name']}!")
|
|
369
383
|
add_visualization_info(collection, collection_config, endpoint_config)
|
|
370
384
|
|
|
371
385
|
root_collection.update_extent_from_items()
|
|
@@ -571,6 +585,8 @@ def handle_WMS_endpoint(
|
|
|
571
585
|
link = collection.add_item(item)
|
|
572
586
|
link.extra_fields["datetime"] = format_datetime_to_isostring_zulu(dt)
|
|
573
587
|
collection.update_extent_from_items()
|
|
588
|
+
else:
|
|
589
|
+
LOGGER.warn(f"NO datetimes returned for collection: {collection_config['Name']}!")
|
|
574
590
|
|
|
575
591
|
# Check if we should overwrite bbox
|
|
576
592
|
if "OverwriteBBox" in endpoint_config:
|
|
@@ -913,6 +929,9 @@ def handle_raw_source(
|
|
|
913
929
|
# eodash v4 compatibility, adding last referenced style to collection
|
|
914
930
|
if style_link:
|
|
915
931
|
collection.add_link(style_link)
|
|
932
|
+
collection.update_extent_from_items()
|
|
933
|
+
else:
|
|
934
|
+
LOGGER.warn(f"NO datetimes configured for collection: {collection_config['Name']}!")
|
|
935
|
+
|
|
916
936
|
add_collection_information(catalog_config, collection, collection_config)
|
|
917
|
-
collection.update_extent_from_items()
|
|
918
937
|
return collection
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: eodash_catalog
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.34
|
|
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
|
|
@@ -23,8 +23,8 @@ Requires-Dist: mergedeep
|
|
|
23
23
|
Requires-Dist: oauthlib<3.3
|
|
24
24
|
Requires-Dist: owslib
|
|
25
25
|
Requires-Dist: pygeofilter[backend-native]==0.2.0
|
|
26
|
-
Requires-Dist: pystac-client<
|
|
27
|
-
Requires-Dist: pystac[validation]
|
|
26
|
+
Requires-Dist: pystac-client<1
|
|
27
|
+
Requires-Dist: pystac[validation]<2
|
|
28
28
|
Requires-Dist: python-dateutil<3
|
|
29
29
|
Requires-Dist: python-dotenv<1.1.0
|
|
30
30
|
Requires-Dist: pyyaml<7
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
eodash_catalog/__about__.py,sha256=
|
|
1
|
+
eodash_catalog/__about__.py,sha256=E85nFpHWi4zVhfnqROklSKnFZhc9qXPdY62-2YS2AXY,138
|
|
2
2
|
eodash_catalog/__init__.py,sha256=_W_9emPYf6FUqc0P8L2SmADx6hGSd7PlQV3yRmCk5uM,115
|
|
3
3
|
eodash_catalog/duration.py,sha256=B6XOZfvNU7SuqpxuVtT1kNKODoOQJXDI6mocvA_U1ik,10816
|
|
4
|
-
eodash_catalog/endpoints.py,sha256=
|
|
4
|
+
eodash_catalog/endpoints.py,sha256=9cSdB_IczNW9hzOJRrI5_qmgsn4snWvUszN6qtvxZn8,37749
|
|
5
5
|
eodash_catalog/generate_indicators.py,sha256=0IHhu_0yOUoUtLqiTsoYQ2IrTrq00yZme3UE6pC9PIU,19772
|
|
6
6
|
eodash_catalog/sh_endpoint.py,sha256=F99LpYT-MGhPiwdSSysm3xBTjaQBXRUkieh-q-vhTvE,1012
|
|
7
7
|
eodash_catalog/stac_handling.py,sha256=2iJwBbsBZIBqGWOdnpIfSug0SoOjbkutpSbWAeQRECU,17828
|
|
8
8
|
eodash_catalog/thumbnails.py,sha256=qZDcpQe80ki6lEMKYdZtSnnHH0PUpcoXTvU9bYdPlzU,2260
|
|
9
9
|
eodash_catalog/utils.py,sha256=YBB-cfS_Z4ErMAuBVizBQg18IMIxJb4amW1MfDGExg0,11666
|
|
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.34.dist-info/METADATA,sha256=LNzkOJ7Q_si5WMYkWZY0CwDK50Rc5uxqVgp3QpBx3UQ,3196
|
|
11
|
+
eodash_catalog-0.0.34.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
12
|
+
eodash_catalog-0.0.34.dist-info/entry_points.txt,sha256=kuUQrDG1PtYd8kPjf5XM6H_NtQd9Ozwl0jjiGtAvZSM,87
|
|
13
|
+
eodash_catalog-0.0.34.dist-info/licenses/LICENSE.txt,sha256=oJCW5zQxnFD-J0hGz6Zh5Lkpdk1oAndmWhseTmV224E,1107
|
|
14
|
+
eodash_catalog-0.0.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|