Query soil profiles for 225 countries at 10km resolution. Built for the DSSAT crop modeling community.
Quick Start: Interactive Map Explorer · API Docs (Swagger UI)
If this project has been helpful to you, please consider giving it a star on GitHub!
soil-query currently makes DSSAT-compatible soil data accessible without downloading a 4.5 GB dataset. It wraps 1,984,797 soil profiles from 225 countries behind a simple API, CLI, and interactive web map. To get started, check out the explorer or API docs linked above.
soil-query/
├── crates/
│ ├── soil-query/ # Core library: data structures, parser, serializer
│ ├── soil-query-parser/ # One-time tool to build the SQLite database from .SOL files
│ ├── soil-query-api/ # REST API server (Axum)
│ └── soil-query-cli/ # CLI tool
├── web/ # Frontend (MapLibre, vanilla JS)
├── test_data/ # 10 sample .SOL files for testing
└── output/ # Generated database and reports (gitignored)
For more details, check out the appropriate README file:
crates/soil-query-parser/README.md: building the database from raw .SOL filescrates/soil-query-cli/README.md: CLI commands, installation, examplescrates/soil-query-api/README.md: API endpoints, deployment, configurationweb/README.md: frontend setup, deployment, file structure
# Run all tests
cargo test --all
# Lint
cargo clippy --all-targets --all-features
# Build all binaries
cargo build --release
# Run the API locally
cargo run --release --bin soil-query-api
# View generated docs
cargo doc --openHan, Eunjin; Ines, Amor; Koo, Jawoo, 2015. "Global High-Resolution Soil Profile Database for Crop Modeling Applications.", http://dx.doi.org/10.7910/DVN/1PEEY0, Harvard Dataverse, V1.
Licensed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-MIT and LICENSE-APACHE for details.
TODO