Rust implementation of the SpatioTemporal Asset Catalog (STAC) specification.
To use the library in your project:
toml
[dependencies]
stac = "0.4"
There are three opt-in features: jsonschema
, reqwest
, and set_query
.
The jsonschema
feature enables validation against json-schema definitions:
toml
[dependencies]
stac = { version = "0.4", features = ["jsonschema"]}
The jsonschema
feature also enables the reqwest
feature.
If you'd like to use the library with reqwest
for blocking remote reads:
toml
[dependencies]
stac = { version = "0.4", features = ["reqwest"]}
If reqwest
is not enabled, stac::read
will throw an error if you try to read from a url.
The set_query
feature adds a single method to Link
.
It is behind a feature because it adds a dependency, serde_urlencoded.
To enable:
toml
stac = { version = "0.4", features = ["set_query"]}
```rust // Create an item from scratch. let item = stac::Item::new("an-id");
// Read an item from the filesystem. let item: stac::Item = stac::read("data/simple-item.json").unwrap(); ```
Please see the documentation for more usage examples.