Skip to main content
AgriSpectra-Q

Technology Stack

A full-stack hyperspectral intelligence platform built on open-source geospatial science, a lean Python backend, and a modern Next.js frontend.

End-to-End Flow

1

Select an EnMAP scene

Choose from three pre-loaded hyperspectral scenes captured over agricultural zones in Sudan, China and Russia

2

Live analysis engine activates

Two-pass spectral anomaly detection runs across all 224 bands of the selected scene

3

Spectral-anomaly raster computed

Per-pixel RMS spectral deviation scores identify scene-relative spectral anomalies across the full scene

4

Priority zones extracted

High-risk connected regions are ranked by severity, area, and spectral confidence

5

Georeferenced outputs generated

Zone boundaries, spectral evidence, and inspection budget are exported with full coordinate metadata

6

Interactive dashboard rendered

Zones, risk maps, spectral charts, and budget recommendations are displayed in real time

Dependencies by Layer

Frontend

Next.js 15React framework with server-side rendering
React 19UI component library
TypeScript 5.7End-to-end type safety
Tailwind CSSResponsive design system
RechartsRisk & budget visualisation charts
MapLibre GLInteractive georeferenced zone maps

Backend API

Python 3.11+Core runtime for analysis engine and API
Flask 3.0Lightweight REST API server

Processing Engine

RasterioGeoreferenced GeoTIFF reading with windowed streaming
NumPyVectorised spectral band arithmetic
SciPyConnected-component zone detection

Scientific Benchmark

scikit-learnRandom Forest, calibration, cross-validation
XGBoostGradient-boosted tree models on spectral features
pandasData manipulation and result tables
matplotlibScientific figures and benchmark charts

Atlas Tools

generate_spectral_atlas.pyFour-panel atlas generator — anomaly score, priority classes, ambiguity proxy, P95 footprint
validate_spectral_atlas.pyPre-publication validator — checks CRS, dimensions, transform, scene ID, and manifest

Planet Tanager

h5pyHDF5 structure inspection and valid-band/pixel extraction
run_tanager_experiment.pyTile-by-tile Tanager TRUST experiment runner
GeoJSON multipartCorrected multipart raster-to-polygon output with rasterize-back validation

Data

EnMAP GeoTIFF224-band hyperspectral L2A scenes at 30 m/px resolution
Planet Tanager HDF5Real hyperspectral HDF5 scene — Google Drive supplied, 426 bands, EPSG:32721
GeoJSONGeoreferenced zone boundaries with coordinate metadata

Deployment

VercelFrontend — global edge network, automatic HTTPS
Ubuntu VPS + nginxBackend — dedicated server with SSL certificates
DockerContainerised engine for reproducible builds

Design Principles

No Label Leakage

The live engine uses only unsupervised spectral anomaly statistics. No disease labels, no test-set data, no ground truth.

Frozen Benchmark

The six-model scientific validation is completely separate from the live engine. Benchmark results are pre-computed and immutable.

Scene-Relative Thresholds

Priority thresholds are percentile-based within each scene. They are not absolute disease severity levels.

Reproducible Runs

Every run writes a manifest.json with the run ID, source path, CRS, SHA-256, and leakage-control statement.

Windowed Streaming

Full GeoTIFF scenes are processed block-by-block with constant memory footprint regardless of scene size.

Honest Uncertainty

The system explicitly reports limitations: wavelength metadata unavailable, proxy labels only, thresholds are relative.

Three Independent Tracks

EnMAP Live Matrix, frozen benchmark, and Planet Tanager are separate experiment tracks. Results must not be mixed across tracks.

Atlas Validation Gate

The spectral atlas validator (validate_spectral_atlas.py) must pass before any atlas image is published to the website.

Geospatial Integrity

Rasterize-back validation confirms that GeoJSON zones match the source raster mask exactly (IoU = 1.0 for the Tanager corrected output).