stac
Rust implementation of the SpatioTemporal Asset Catalog (STAC) specification.
Usage
To use the library in your project:
[]
= "0.8"
Examples
use Item;
// Creates an item from scratch.
let item = new;
// Reads an item from the filesystem.
let item: Item = read.unwrap;
Please see the documentation for more usage examples.
Features
There are a few opt-in features.
reqwest
reqwest
enables blocking remote reads:
[]
= { = "0.8", = ["reqwest"]}
Then:
let href = "https://raw.githubusercontent.com/radiantearth/stac-spec/master/examples/simple-item.json";
let item: Item = read.unwrap;
If reqwest
is not enabled, stac::read
will throw an error if you try to read from a url.
let href = "https://raw.githubusercontent.com/radiantearth/stac-spec/master/examples/simple-item.json";
let err = .unwrap_err;
For non-blocking IO, use the stac-async crate.
gdal
To use GDAL to create items with projection and raster band information, you'll need GDAL installed on your system:
[]
= { = "0.8", = ["gdal"] }
Then, items created from rasters will include the projection and raster extensions:
geo
Use geo to add some extra geo-enabled methods:
[]
= { = "0.8", = ["geo"] }
Then, you can set an item's geometry and bounding box at the same time:
Other info
This crate is part of the stac-rs monorepo, see its README for contributing and license information.