STAC-geoparquet
Convert STAC items to geoparquet.
Purpose
This library helps convert STAC Items to geoparquet. It might be useful for you if you host a large number of STAC items through a STAC API, but want to provide a bulk API for users who need to access many items.
Usage
stac_geoparquet.to_dataframe does it all. You give it a list of (STAC Item) dictionaries. It just converts them to a geopandas.GeoDataFrame, which can be written to parquet with .to_parquet.
>>> import requests
>>> import stac_geoparquet
>>> item = requests.get("https://planetarycomputer.microsoft.com/api/stac/v1/collections/naip/items/ia_m_4209150_sw_15_060_20190828_20191105").json()
>>> df = stac_geoparquet.to_geodataframe([item])
>>> df.to_parquet("naip.parquet")
Note that stac_geoparquet lifts the keys in the item properties up to the top level of the DataFrame, similar to geopandas.GeoDataFrame.from_features.
>>> list(df.columns)
['type',
'stac_version',
'stac_extensions',
'id',
'geometry',
'bbox',
'links',
'assets',
'collection',
'gsd',
'datetime',
'naip:year',
'proj:bbox',
'proj:epsg',
'naip:state',
'proj:shape',
'proj:transform']
We also provide stac_geoparquet.to_dict and stac_geoparquet.to_item_collection helpers that can be used to convert from DataFrames back to the original STAC items.
pgstac integration
stac_geoparquet.pgstac_reader has some helpers for working with items coming from a pgstac.items table. It takes care of
- Rehydrating the dehydrated items
- Partitioning by time
- Injecting dynamic links and assets from a STAC API
Metadata
Release files for stac-geoparquet 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stac_geoparquet-0.1.0.tar.gz | 9.1 kB | Without provenance | Details for stac_geoparquet-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stac_geoparquet-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for stac_geoparquet-0.1.0-py3-none-any.whl |
Total release size: 19.6 kB
Release files / stac_geoparquet-0.1.0.tar.gz
| Download URL | stac_geoparquet-0.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a615dde87c36353e856e5162f159294386b462d4be47f31ba89191b6c02edc8e
|
|
BLAKE2b-256 checksum How to use checksums |
0387e54c1c71c40d77cc475531a347b2b66dd3e69607fd4e1fa20d37e5610188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.3
|
Release files / stac_geoparquet-0.1.0-py3-none-any.whl
| Download URL | stac_geoparquet-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2bfba6eeb69c5925e36d8eb867a8a2f8116255d0ebffff43c5ea54c92565929
|
|
BLAKE2b-256 checksum How to use checksums |
d85e7d505a3093b4772b40d5e303a55c350692cf500dffb59e6ecda9e0be386f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.3
|
Security for stac-geoparquet 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.