Rust implementation of the SpatioTemporal Asset Catalog (STAC) specification. Not yet published to crates.io.
Read STAC objects:
rust
let object = stac::read("data/catalog.json").unwrap();
println!("{}", object.id());
Read STAC catalogs as trees:
rust
use stac::Stac;
let (stac, _) = Stac::read("data/catalog.json").unwrap();
Write STAC catalogs using the BestPracticesRenderer
:
rust
use stac::{BestPracticesRenderer, Render, Writer, Write};
let renderer = BestPracticesRenderer::new("a/new/root/directory").unwrap();
let writer = Writer::default();
stac.write(&renderer, &writer).unwrap();
For a more complete walkthrough, see the documentation.
There is a brief example at examples/copy.rs that demonstrates a simple read-write operation. You can use it from the command line:
shell
cargo run --examples copy data/catalog.json tmp
See CONTRIBUTING.md for information about contributing to this project.
To create a new release:
release/
, e.g. release/v0.1.0
cargo publish --dry-run
action to check publish-ability), mergestac-rs is dual-licenced under both the MIT license and the Apache license (Version 2.0). See LICENSE-APACHE and LICENSE-MIT for details.