-
|
I'm trying to create stac-geoparquet for some existing static STAC collections (~1000 items), the docs currently are focused on API search results and I'm wondering about a couple things
path = 'collection.json'
c = pystac.read_file(path)
items = [i.to_dict() for i in c.get_items(recursive=True)]
stacrs.write(path.replace('.json', '.geoparquet'), items)
I'm not sure this can currently be done with items = [i.to_dict() for i in c.get_items(recursive=True)]
table = stacrs.to_arrow(items)
collection_metadata = {'stac:collection': json.dumps(collection.to_dict())}
updated_table = table.replace_schema_metadata(collection_metadata)
# how to write to geoparquet w/ additional metadata ??Side note: I also tried stac-geoparquet, but it overwrites schema metadata to only have the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not yet, but it wouldn't be hard to add ... we've got https://docs.rs/stac/latest/stac/struct.Node.html#method.into_values in the underlying Rust crate, so we'll just need to expose that in a
Unsupported at this time: stac-utils/rustac#428 |
Beta Was this translation helpful? Give feedback.
@scottyhq for the first one (walking all items) try https://pypi.org/project/stacrs/0.5.9b0/ (
python -m pip install --pre --upgrade stacrs). Iterating all items would look like: