Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 90b1098

Browse files
committed
deps: update stac-fastapi-geoparquet
1 parent 2126997 commit 90b1098

File tree

4 files changed

+113
-3
lines changed

4 files changed

+113
-3
lines changed

data/collections.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[
2+
{
3+
"type": "Collection",
4+
"stac_version": "1.1.0",
5+
"id": "naip",
6+
"description": "This collection was generated by rustac v0.12.0 from 10000 items",
7+
"license": "other",
8+
"extent": {
9+
"spatial": {
10+
"bbox": [
11+
[
12+
-109.130426,
13+
36.933639,
14+
-101.993445,
15+
41.067413
16+
]
17+
]
18+
},
19+
"temporal": {
20+
"interval": [
21+
[
22+
"2019-09-19T00:00:00Z",
23+
"2022-08-27T16:00:00Z"
24+
]
25+
]
26+
}
27+
},
28+
"links": [],
29+
"assets": {
30+
"data": {
31+
"href": "./naip.parquet",
32+
"type": "application/vnd.apache.parquet"
33+
}
34+
}
35+
}
36+
]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ignore_missing_imports = true
3939
select = ["E", "F", "I"]
4040

4141
[tool.uv.sources]
42-
stac-fastapi-geoparquet = { git = "https://github.com/stac-utils/stac-fastapi-geoparquet", rev = "5d8b44423bb98b875a78312646ff76fe6823076d" }
42+
stac-fastapi-geoparquet = { git = "https://github.com/stac-utils/stac-fastapi-geoparquet", rev = "af3d33d5a6b822f4d298ab3bfe8b74256d745d0e" }
4343

4444
[build-system]
4545
requires = ["setuptools"]

scripts/generate-collections

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env python3
2+
3+
import asyncio
4+
import json
5+
import sys
6+
from pathlib import Path
7+
8+
import pystac.utils
9+
import rustac
10+
11+
OUTPUT_PATH = Path(__file__).parents[1] / "data" / "collections.json"
12+
13+
14+
async def main() -> None:
15+
if len(sys.argv) == 1:
16+
raise Exception("ERROR: must provide at least one href on the command line")
17+
18+
collections = []
19+
for href in sys.argv[1:]:
20+
items = await rustac.read(href)
21+
collection = rustac.collection_from_id_and_items(
22+
Path(href).stem, items["features"]
23+
)
24+
collection["links"] = []
25+
collection["assets"] = {
26+
"data": {
27+
"href": pystac.utils.make_relative_href(
28+
str(Path(href).absolute()), OUTPUT_PATH
29+
),
30+
"type": "application/vnd.apache.parquet",
31+
}
32+
}
33+
collections.append(collection)
34+
35+
with open(OUTPUT_PATH, "w") as f:
36+
json.dump(collections, f, indent=2)
37+
38+
39+
if __name__ == "__main__":
40+
asyncio.run(main())

uv.lock

Lines changed: 36 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)