This workspace contains the Geo Engine crates.
- While Geo Engine should build on Linux and Windows environments, we currently only support Ubuntu Linux 22.04 LTS.
- You need a recent Rust environment with a Rust nightly compiler. We recommend rustup to manage Rust
https://rustup.rs/
.
# Build essentials
apt install build-essential
# lld linker
apt install clang lld
# GDAL (>= 3.4.1)
apt install libgdal-dev gdal-bin
# Proj build dependencies (if libproj >= 7.2 not installed)
apt install cmake sqlite3
Please run Clippy with
cargo clippy --all-targets --all-features
before creating a pull request.
Please provide tests with all new features and run
cargo test
before creating a pull request.
Edit Settings-test.toml
for environment specific test parameters.
For running the PostgreSQL tests, you need to have it installed.
Furthermore, you need to create a default user geoengine
with password geoengine
.
sudo -u postgres psql << EOF
\set AUTOCOMMIT on
CREATE USER geoengine WITH PASSWORD 'geoengine' CREATEDB;
CREATE DATABASE geoengine OWNER geoengine;
EOF
During development, you can use the following command to clean the database and start the server.
sudo -u postgres psql -d geoengine -c "drop schema public cascade; create schema public authorization geoengine; create extension postgis;" && cargo run --features pro
For performance-critical features, we aim to provide benchmarks in the benches
directory.
If you plan on optimizing a feature of Geo Engine, please confirm it this way.
Deploy an instance using cargo run --package geoengine-services --bin main --release
.
The PostgreSQL storage backend can optionally be enabled using --features postgres
in the cargo
command.
Copy Settings-default.toml
to Settings.toml
and edit per your requirements.
Problem: When running Geo Engine or its tests you encounter one of the following (or similar) errors:
Cannot allocate Memory (OS Error 12)
Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
Solution: Adjust the system's max_map_count
parameter:
- Temporary configuration:
sudo sysctl -w vm.max_map_count=262144
- Permanent configuration:
- Add the following line to /etc/sysctl.d/local.conf
vm.max_map_count=262144
- Reload the system config:
sudo sysctl --system
- Add the following line to /etc/sysctl.d/local.conf
We are grateful for any contributions. Please make sure to read our contributing guide.