stac-utils / stac-rs

Tools and libraries for the SpatioTemporal Asset Catalog (STAC) specification, written in Rust
https://stac-utils.github.io/stac-rs/
Apache License 2.0
83 stars 11 forks source link
command-line earth-observation geospatial metadata python raster rust server stac

stac-rs

GitHub Workflow Status Crates.io Contributor Covenant

Ferris the crab holding the STAC logo

Command Line Interface (CLI), Rust libraries, and more for the SpatioTemporal Asset Catalog (STAC) specification.

Python

🦀 🤝 🐍

stacrs is a small, no-dependency Python library that uses stac-rs under the hood. It is meant to supplement (not replace) existing Python STAC tooling such as pystac and pystac-client. To install:

python -m pip install stacrs

Then:

import stacrs

stacrs.search_to("items-compressed.parquet",
    "https://landsatlook.usgs.gov/stac-server",
    collections="landsat-c2l2-sr",
    intersects={"type": "Point", "coordinates": [-105.119, 40.173]},
    sortby="-properties.datetime",
    max_items=1000,
    format="parquet[snappy]",
)

See the Python documentation for more information.

Command line interface

Our command line interface (CLI) can query STAC APIs, validate STAC, and more. Install:

pip install stacrs-cli
# or
cargo install stac-cli

Then:

$ stacrs search https://landsatlook.usgs.gov/stac-server \
    -c landsat-c2l2-sr --intersects \
    '{"type": "Point", "coordinates": [-105.119, 40.173]}' \
    --sortby='-properties.datetime' \
    --max-items 1000 \
    -f 'parquet[snappy]' \
    items.parquet

Crates

This monorepo contains several crates:

Crate Description Badges
stac Core data structures and I/O docs.rs
Crates.io
stac-api Data structures for the STAC API specification docs.rs
Crates.io
stac-extensions Basic support for STAC extensions docs.rs
Crates.io
stac-cli Command line interface docs.rs
Crates.io
stac-server STAC API server with multiple backends docs.rs
Crates.io
pgstac Bindings for pgstac docs.rs
Crates.io
stac-duckdb Experimental client for duckdb docs.rs
Crates.io

Development

See CONTRIBUTING.md for information about contributing to this project. See RELEASING.md for a checklist to use when releasing a new version.

License

stac-rs is dual-licensed under both the MIT license and the Apache license (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.