A high-performance FastAPI microservice dedicated to raster and point-cloud analytics for the SylvaLens platform.
- FORMS-T Analysis: Calculates AGBD, Height, and WVD using
rasterstats. - Hansen GFC Analysis: Calculates forest cover and year-over-year loss.
- LiDAR HD Processing: Uses
PDALto dynamically crop and calculate height percentiles from COPC LAZ point clouds. - OpenAPI: Automatically generates API contracts for frontend consumption.
- Python 3.10+
- The
forest-resdata volume must be properly configured (see theinfrarepository validation scripts).
Copy the .env.example file to .env:
cp .env.example .envEnsure the data paths (FORMS_T_PATH, etc.) point to your local datasets.
We recommend running this via Docker using the infra stack because it requires complex C++ dependencies like PDAL and GDAL.
If you wish to run it natively on Ubuntu/Linux:
apt-get install python3-dev libpdal-dev pdal
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000Swagger documentation is available at http://localhost:8000/docs.
See the sylvalens/infra repository for production deployment orchestration using the optimized multi-stage Dockerfile.