6 releases

0.3.2 Nov 12, 2024
0.3.1 Sep 19, 2024
0.2.0 Sep 6, 2024
0.1.1 Aug 12, 2024
0.1.0 Apr 29, 2024

#220 in Science

Download history 11/week @ 2024-08-17 125/week @ 2024-08-31 42/week @ 2024-09-07 245/week @ 2024-09-14 51/week @ 2024-09-21 58/week @ 2024-09-28 9/week @ 2024-10-05 6/week @ 2024-10-12 104/week @ 2024-11-09 18/week @ 2024-11-16 3/week @ 2024-11-23 10/week @ 2024-11-30

135 downloads per month
Used in stac-cli

MIT/Apache

2MB
8K SLoC

stac-server

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

A STAC API server with multiple backends.

Usage

To run a server from the command-line, use stac-cli. Any arguments will be interpreted as hrefs to STAC collections, items, and item collections, and will be loaded into the server on startup.

stac serve collection.json items.json

To use the pgstac backend:

stac serve --pgstac postgresql://username:password@localhost:5432/postgis

If you'd like to serve your own pgstac backend with some sample items:

docker compose up -d pgstac
scripts/load-pgstac-fixtures  # This might take a while, e.g. 30 seconds or so

Library

To use this library in another application:

[dependencies]
stac-server = "0.3"

Deploying

There is currently no infrastructure-as-code for deploying stac-server. We hope to provide this support in the future.

Features

stac-server has two optional features.

axum

The axum feature enables routing and serving using axum.

pgstac

In order to use the pgstac, you need to enable the pgstac feature.

Backends

This table lists the provided backends and their supported conformance classes and extensions:

Capability Memory backend Pgstac backend
STAC API - Core
STAC API - Features
STAC API - Item Search
Aggregation extension ✖️ ✖️
Browseable extension ✖️ ✖️
Children extension ✖️ ✖️
Collection search extension ✖️ ✖️
Collection transaction extension ✖️ ✖️
Fields extension ✖️ ✖️
Filter extension ✖️ ✅️
Free-text search extension ✖️ ✖️
Language (I18N) extension ✖️ ✖️
Query extension ✖️ ✖️
Sort extension ✖️ ✖️
Transaction extension ✖️ ✖️

Other info

This crate is part of the stac-rs monorepo, see its README for contributing and license information.

Dependencies

~18–32MB
~507K SLoC