eodash_catalog 0.0.14__py3-none-any.whl → 0.0.15__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 +41 -54
- {eodash_catalog-0.0.14.dist-info → eodash_catalog-0.0.15.dist-info}/METADATA +1 -1
- {eodash_catalog-0.0.14.dist-info → eodash_catalog-0.0.15.dist-info}/RECORD +7 -7
- {eodash_catalog-0.0.14.dist-info → eodash_catalog-0.0.15.dist-info}/WHEEL +0 -0
- {eodash_catalog-0.0.14.dist-info → eodash_catalog-0.0.15.dist-info}/entry_points.txt +0 -0
- {eodash_catalog-0.0.14.dist-info → eodash_catalog-0.0.15.dist-info}/licenses/LICENSE.txt +0 -0
eodash_catalog/__about__.py
CHANGED
eodash_catalog/endpoints.py
CHANGED
|
@@ -106,29 +106,17 @@ def handle_STAC_based_endpoint(
|
|
|
106
106
|
catalog, collection_config["Name"], collection_config, catalog_config, endpoint_config
|
|
107
107
|
)
|
|
108
108
|
for location in collection_config["Locations"]:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
)
|
|
121
|
-
else:
|
|
122
|
-
collection = process_STACAPI_Endpoint(
|
|
123
|
-
catalog_config=catalog_config,
|
|
124
|
-
endpoint_config=endpoint_config,
|
|
125
|
-
collection_config=collection_config,
|
|
126
|
-
catalog=catalog,
|
|
127
|
-
options=options,
|
|
128
|
-
headers=headers,
|
|
129
|
-
bbox=",".join(map(str, location["Bbox"])),
|
|
130
|
-
root_collection=root_collection,
|
|
131
|
-
)
|
|
109
|
+
collection = process_STACAPI_Endpoint(
|
|
110
|
+
catalog_config=catalog_config,
|
|
111
|
+
endpoint_config=endpoint_config,
|
|
112
|
+
collection_config=collection_config,
|
|
113
|
+
catalog=catalog,
|
|
114
|
+
options=options,
|
|
115
|
+
headers=headers,
|
|
116
|
+
filter_dates=location.get("FilterDates"),
|
|
117
|
+
bbox=",".join(map(str, location["Bbox"])),
|
|
118
|
+
root_collection=root_collection,
|
|
119
|
+
)
|
|
132
120
|
# Update identifier to use location as well as title
|
|
133
121
|
# TODO: should we use the name as id? it provides much more
|
|
134
122
|
# information in the clients
|
|
@@ -159,25 +147,18 @@ def handle_STAC_based_endpoint(
|
|
|
159
147
|
if isinstance(c_child, Collection):
|
|
160
148
|
root_collection.extent.spatial.bboxes.append(c_child.extent.spatial.bboxes[0])
|
|
161
149
|
else:
|
|
150
|
+
bbox = None
|
|
162
151
|
if "Bbox" in endpoint_config:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
root_collection = process_STACAPI_Endpoint(
|
|
174
|
-
catalog_config=catalog_config,
|
|
175
|
-
endpoint_config=endpoint_config,
|
|
176
|
-
collection_config=collection_config,
|
|
177
|
-
catalog=catalog,
|
|
178
|
-
options=options,
|
|
179
|
-
headers=headers,
|
|
180
|
-
)
|
|
152
|
+
bbox = ",".join(map(str, endpoint_config["Bbox"]))
|
|
153
|
+
root_collection = process_STACAPI_Endpoint(
|
|
154
|
+
catalog_config=catalog_config,
|
|
155
|
+
endpoint_config=endpoint_config,
|
|
156
|
+
collection_config=collection_config,
|
|
157
|
+
catalog=catalog,
|
|
158
|
+
options=options,
|
|
159
|
+
headers=headers,
|
|
160
|
+
bbox=bbox,
|
|
161
|
+
)
|
|
181
162
|
|
|
182
163
|
add_example_info(root_collection, collection_config, endpoint_config, catalog_config)
|
|
183
164
|
return root_collection
|
|
@@ -199,6 +180,12 @@ def process_STACAPI_Endpoint(
|
|
|
199
180
|
collection = get_or_create_collection(
|
|
200
181
|
catalog, endpoint_config["CollectionId"], collection_config, catalog_config, endpoint_config
|
|
201
182
|
)
|
|
183
|
+
datetime_query = ["1900-01-01T00:00:00Z", "3000-01-01T00:00:00Z"]
|
|
184
|
+
if query := endpoint_config.get("Query"):
|
|
185
|
+
if start := query.get("Start"):
|
|
186
|
+
datetime_query[0] = start
|
|
187
|
+
if end := query.get("End"):
|
|
188
|
+
datetime_query[1] = end
|
|
202
189
|
|
|
203
190
|
api = Client.open(endpoint_config["EndPoint"], headers=headers)
|
|
204
191
|
if bbox is None:
|
|
@@ -206,7 +193,7 @@ def process_STACAPI_Endpoint(
|
|
|
206
193
|
results = api.search(
|
|
207
194
|
collections=[endpoint_config["CollectionId"]],
|
|
208
195
|
bbox=bbox,
|
|
209
|
-
datetime=
|
|
196
|
+
datetime=datetime_query, # type: ignore
|
|
210
197
|
)
|
|
211
198
|
# We keep track of potential duplicate times in this list
|
|
212
199
|
added_times = {}
|
|
@@ -813,18 +800,18 @@ def handle_raw_source(
|
|
|
813
800
|
endpoint_config,
|
|
814
801
|
item,
|
|
815
802
|
)
|
|
816
|
-
ep_st
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
803
|
+
if ep_st := endpoint_config.get("Style"):
|
|
804
|
+
style_link = Link(
|
|
805
|
+
rel="style",
|
|
806
|
+
target=ep_st
|
|
807
|
+
if ep_st.startswith("http")
|
|
808
|
+
else f"{catalog_config['assets_endpoint']}/{ep_st}",
|
|
809
|
+
media_type=style_type,
|
|
810
|
+
extra_fields={
|
|
811
|
+
"asset:keys": list(assets),
|
|
812
|
+
},
|
|
813
|
+
)
|
|
814
|
+
item.add_link(style_link)
|
|
828
815
|
link = collection.add_item(item)
|
|
829
816
|
link.extra_fields["datetime"] = time_entry["Time"]
|
|
830
817
|
link.extra_fields["assets"] = [a["File"] for a in time_entry["Assets"]]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: eodash_catalog
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.15
|
|
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=IVDENoZTPvh5evYDrfWrEHJJnzkDZ1pH3Gf9Il5ZGjg,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=UQtrhtxl5jNd_5SXBQrtRopLphX4mkro7tcpnOY3Ny8,32723
|
|
5
5
|
eodash_catalog/generate_indicators.py,sha256=DlbgMuNVPGdg8roYO7raXIeTmsMRpsyN71DYnRATATI,18790
|
|
6
6
|
eodash_catalog/sh_endpoint.py,sha256=vELooJwk269v1DNnOzb32vil96vL_SRCio8UBlx10N0,618
|
|
7
7
|
eodash_catalog/stac_handling.py,sha256=BKFFhM2JhrBnEd6EbEESAIUcFncDaAb5N4aHx0uZBv4,18197
|
|
8
8
|
eodash_catalog/thumbnails.py,sha256=31Wk38oNQDxfhSUbMLBpHuZFhsR8v_7luYr65XQtDf0,2213
|
|
9
9
|
eodash_catalog/utils.py,sha256=FZIn3iwMNjdaGAlbaIHPffYkAhlIHpNU2vkMJmEcYRQ,8427
|
|
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.15.dist-info/METADATA,sha256=AKHmY9ssYxP9hqIxVy4WY0w8VETzC7K_8aaCkjc8ZzQ,3203
|
|
11
|
+
eodash_catalog-0.0.15.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
12
|
+
eodash_catalog-0.0.15.dist-info/entry_points.txt,sha256=kuUQrDG1PtYd8kPjf5XM6H_NtQd9Ozwl0jjiGtAvZSM,87
|
|
13
|
+
eodash_catalog-0.0.15.dist-info/licenses/LICENSE.txt,sha256=oJCW5zQxnFD-J0hGz6Zh5Lkpdk1oAndmWhseTmV224E,1107
|
|
14
|
+
eodash_catalog-0.0.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|