https://github.com/georust/ogcapi
OGC API building blocks implemented in Rust
https://github.com/georust/ogcapi
Last synced: 24 days ago
JSON representation
OGC API building blocks implemented in Rust
- Host: GitHub
- URL: https://github.com/georust/ogcapi
- Owner: georust
- License: apache-2.0
- Created: 2022-04-08T16:58:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-19T12:23:33.000Z (12 months ago)
- Last Synced: 2024-10-29T18:58:38.462Z (6 months ago)
- Language: Rust
- Homepage:
- Size: 19.7 MB
- Stars: 25
- Watchers: 12
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-georust - OGC API - OGC API building blocks. (Watchlist)
README
# ogcapi
[](https://docs.rs/ogcapi)
[](https://crates.io/crates/ogcapi)The `ogcapi` crate provides various [OGC API](https://ogcapi.ogc.org/) building blocks implemented in [Rust](https://www.rust-lang.org/).
## Project Outline
The code is organized in modules, respectively crates:
| Module / Crate | Description |
| ----------------- | --------------- |
| `types` | Types as defined in various OGC API standards as well as STAC with `serde` support. |
| `client` | Client to access HTTP endpoints of OGC API services as well as STAC wrapping `reqwest` |
| `services` | Server implementation of various OGC API services based on `axum`. |
| `drivers` | Drivers for different data provider backends, currently mainly PostgreSQL with PostGIS through `sqlx`. |
| `processes` | `Processor` trait and implementations. |These modules are reexported within the `ogcapi` crate.
## Quick Start (Podman/Docker)
This will take a while and use quite some disk space
```bash
# Setup the database
podman compose up --build# Import administrative bounaries
podman exec -ti ogcapi cargo run -p data-loader -- --input data/ne_110m_admin_0_countries.geojson --collection countries# Run app
podman exec -ti ogcapi cargo run -p demo-service
```Open were you will find the `Landing Page`.
## Developing
### Prerequisites
- Rust
- Podman or Docker
- GDAL```bash
# Install SQLx CLI
cargo install sqlx-cli --no-default-features --features postgres,rustls
```### Setup
```bash
# Run services
podman compose up db minio minio-mc -d# Import administrative bounaries
cargo run -p data-loader -- --input data/ne_110m_admin_0_countries.geojson --collection countries# Start service
cargo run -p demo-service# Run tests
cargo test --workspace --all-features --all-targets# Open Documentation
cargo doc --workspace --all-features --no-deps --open
```### Format / Lint
```bash
# Format
cargo fmt# Clippy
cargo clippy --workspace --all-features --all-targets
```### Teamengine
```bash
podman run --network host docker.io/ogccite/ets-ogcapi-features10
# podman run --network host docker.io/ogccite/ets-ogcapi-edr10
```Navigate to to execute the test suite. For documentation and more info see .
## Example Project
Based on this project, a STAC enabled OGC API Features service has successfully been setup. You can find the code from the prove of concept [here](https://github.com/camptocamp/oapi-poc)
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.