#stac #geospatial #metadata #raster #assets #geo #api-server

stac-api

Rust library for the SpatioTemporal Asset Catalog (STAC) API specification

6 releases

new 0.3.3 Apr 7, 2024
0.3.2 Oct 11, 2023
0.3.0 Sep 25, 2023
0.2.1 Sep 25, 2023
0.1.0 Jan 14, 2023

#385 in Science

Download history 9/week @ 2024-01-19 1/week @ 2024-01-26 1/week @ 2024-02-02 9/week @ 2024-02-09 33/week @ 2024-02-16 34/week @ 2024-02-23 59/week @ 2024-03-01 48/week @ 2024-03-08 59/week @ 2024-03-15 84/week @ 2024-03-22 71/week @ 2024-03-29 159/week @ 2024-04-05

376 downloads per month
Used in 3 crates

MIT/Apache

1.5MB
3.5K SLoC

stac-api

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

Rust implementation of the data structures that make up the STAC API specification. This is not a server implementation. For a STAC API server written in Rust, check out stac-server-rs.

Usage

To use the library in your project:

[dependencies]
stac-api = "0.3"

stac-api has two optional features. geo enables Search::match:

[dependencies]
stac-api = { version = "0.3", features = ["geo"] }

schemars, can be used to generate jsonschema documents for the API structures. This is useful for auto-generating OpenAPI documentation:

[dependencies]
stac-api = { version = "0.3", features = ["schemars"] }

Examples

use stac_api::{Root, Conformance, CORE_URI};
use stac::Catalog;

// Build the root (landing page) endpoint.
let root = Root {
    catalog: Catalog::new("an-id", "a description"),
    conformance: Conformance {
        conforms_to: vec![CORE_URI.to_string()],
    }
};

Please see the documentation for more usage examples.

Dependencies

~4–6.5MB
~144K SLoC