stac-rs

GitHub Workflow Status docs.rs Crates.io \ Crates.io Contributor Covenant

Rust implementation of the SpatioTemporal Asset Catalog (STAC) specification.

Examples

Read STAC objects:

rust let object = stac::read("data/catalog.json").unwrap(); println!("{}", object.id());

Write STAC catalogs using the BestPracticesRenderer:

rust use stac::{Stac, BestPracticesRenderer, Render, Writer, Write}; let (stac, _) = Stac::read("data/catalog.json").unwrap(); let renderer = BestPracticesRenderer::new("a/new/root/directory").unwrap(); let writer = Writer::default(); stac.write(&renderer, &writer).unwrap();

For more, see the documentation.

Executables

As of now, there is no command line interface. There is an example at examples/copy.rs that demonstrates a simple read-write operation. To run it from the command line:

shell cargo run --examples copy data/catalog.json tmp

Development

See CONTRIBUTING.md for information about contributing to this project. See RELEASING.md for instructions on 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.