Skip to content

Latest commit

Β 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌾 NDVI Taakkaart Generator

NL | EN

Een browser-gebaseerde tool om variabele-dosering taakkaarten te genereren vanuit multispectrale NDVI GeoTIFF-opnames van drones.

Geen installatie, geen account β€” kloon de repository, start een lokale webserver en open de app in je browser.


Functies

  • GeoTIFF upload β€” Ondersteuning voor WebODM/ODM multispectrale beelden, pre-berekende NDVI en DJI Terra RGB Plant Health exports.
  • Automatische banddetectie β€” Detecteert Red, Green, NIR en RedEdge via golflengte-metadata of ODM-conventie; handmatige override mogelijk.
  • 20+ vegetatie-indexen β€” NDVI, GNDVI, NDRE, SAVI, WDVI, EVI, VARI en meer. Selecteer de index in de UI; de juiste banden worden automatisch geselecteerd.
  • WDVI soil line parameter β€” De bodemcorrectiefactor a van de Weighted Difference Vegetation Index is instelbaar via een slider (0.50–1.80) met presets voor zand-, klei- en organische bodems.
  • Instelbare resolutie β€” Slider van 512–8192 px bepaalt op welke resolutie het raster geladen wordt. Hogere waarden geven nauwkeurigere indexberekeningen.
  • Parcel clipping β€” NDVI-overlay en histogram worden automatisch geknipt naar geselecteerde percelen. Kleuren en schaal blijven consistent met het volledige raster.
  • BRP perceelintegratie β€” Laadt live Nederlandse perceelgrenzen via PDOK WFS; selecteer percelen door erop te klikken.
  • Gewashistorie β€” Toont jaarlijkse gewasregistraties per perceel op basis van BRP-data.
  • NDVI-histogram β€” Visuele verdeling van indexwaarden over het perceel met klasgrenzen.
  • Auto-classificatie β€” Verdeelt klassen automatisch op basis van gelijke NDVI-oppervlakte.
  • Rijrichting β€” Noord-Zuid knop of automatische optimale rijrichting op basis van de langste perceelzijde; realtime taakkaart preview.
  • Exportformaten β€” Shapefile, ISOXML TaskData, GeoJSON en CSV (zie tabel hieronder).
  • Offline bruikbaar β€” Alle vendor-libraries zijn gebundeld; na clone is geen internet nodig (PDOK data wel live).

Exportformaten

Formaat Bestandsnaam Compatibel met
Shapefile naam.zip ArcGIS, QGIS, John Deere Operations Center, Trimble Ag Software, CNH AFS
ISOXML TaskData naam_TASKDATA.zip ISOBUS task controllers β€” John Deere, Fendt, Claas, AGCO, CNH, Topcon, Trimble
GeoJSON naam.geojson Web-GIS, Mapbox, QGIS, Leaflet
CSV naam.csv Excel, FMIS, Agromanager, elke spreadsheet

Het ISOXML-formaat implementeert ISO 11783-10 (TASKDATA.XML + GRD-binair grid) en is direct inlaadbaar op ISOBUS-compatibele tractor-terminals.


Ondersteunde GeoTIFF-typen

Type Detectiemethode
WebODM / ODM 5-band Golflengte-metadata (NIR 840 nm, R 650 nm, etc.)
DJI Mavic Multispectral Bandnaam-metadata (Red, Nir)
Generieke multispectrale TIF Reflectantie-heuristiek (NIR heeft typisch de hoogste gemiddelde waarde)
Pre-berekende NDVI 1-bands float32 GeoTIFF
DJI Plant Health / Terra export RGB-kleurenkaart (proxy NDVI via G/R kanaalverhouding)

Technologie

Library Doel
Leaflet.js Interactieve kaartvisualisatie
GeoTIFF.js TIFF-parsing met overview-aware lazy reading
proj4js CRS-conversies (RD New, UTM, WGS84)
Turf.js Ruimtelijke analyse β€” grids, intersectie, centroΓ―de, oppervlakte

Pure HTML, CSS en vanilla JavaScript β€” geen frameworks, geen Node.js, geen build-tooling vereist. De applicatielogica is opgesplitst in ES-modules (static/*.js) die native door moderne browsers worden geladen.


Snel starten

git clone https://github.com/HASUniversity/NDVItoTaskmap.git
cd NDVItoTaskmap

Let op: de applicatie gebruikt ES-modules (import/export). Browsers staan dit niet toe via het file://-protocol. Start een lokale webserver:

# Python (ingebouwd, geen installatie nodig)
python -m http.server 8080

# Node.js
npx serve .

# VS Code: gebruik de extensie "Live Server" (rechtsklik β†’ Open with Live Server)

Open vervolgens http://localhost:8080 in Chrome, Firefox of Edge.


Projectstructuur

NDVItoTaskmap/
β”œβ”€β”€ index.html              # Enige HTML-pagina; laadt vendor-scripts en app.js
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ app.js              # ES-module entrypoint β€” imports en initialisatie
β”‚   β”œβ”€β”€ state.js            # Gedeelde applicatiestatus en constanten
β”‚   β”œβ”€β”€ utils.js            # Hulpfuncties (loading, toast, coΓΆrdinatentransformaties)
β”‚   β”œβ”€β”€ map.js              # Leaflet-kaart, basislagen, laagcontrole, legenda
β”‚   β”œβ”€β”€ steps.js            # Wizard-stap-navigatie
β”‚   β”œβ”€β”€ geotiff-loader.js   # GeoTIFF-upload, bandselectie, resolutieslider
β”‚   β”œβ”€β”€ ndvi.js             # Kleurrampen, NDVI-rendering, histogram, auto-classificatie
β”‚   β”œβ”€β”€ brp.js              # BRP WFS-laden, perceelselectie, gewashistorie
β”‚   β”œβ”€β”€ taskmap.js          # Klasseneditor, taakkaartgeneratie, rijrichting
β”‚   β”œβ”€β”€ export.js           # CSV, ISOXML, Shapefile en GeoJSON export
β”‚   β”œβ”€β”€ i18n.js             # Internationalisation (NL/EN)
β”‚   β”œβ”€β”€ styles.css
β”‚   └── vendor/             # Gebundelde third-party libraries (geen CDN-afhankelijkheid)
β”‚       β”œβ”€β”€ leaflet.js / leaflet.css
β”‚       β”œβ”€β”€ geotiff.js
β”‚       β”œβ”€β”€ proj4.js
β”‚       └── turf.min.js
└── LICENSE

Workflow

  1. GeoTIFF laden β€” Sleep een multispectrale .tif in de browser of klik om te uploaden.
  2. Index & banden β€” Kies een vegetatie-index (o.a. NDVI, WDVI, GNDVI, NDRE, SAVI, EVI), stel bij WDVI de soil line parameter a in op basis van het bodemtype, kies de gewenste resolutie en klik Bereken. Banden worden automatisch gedetecteerd.
  3. Percelen selecteren β€” Zoom in tot niveau 14+; BRP-percelen laden automatisch. Klik een perceel om te selecteren. De overlay en het histogram worden automatisch geknipt naar het geselecteerde perceel.
  4. Taakkaart instellen β€” Stel gridgrootte, eenheid, rijrichting en doseringsklassen in. Gebruik auto-classificeer voor gelijke verdeling over klassen.
  5. Exporteren β€” Download in het gewenste formaat voor tractor-terminal of FMIS.

Databronnen

Perceelgrenzen en gewasregistraties worden live opgehaald van PDOK via de BRP Gewaspercelen WFS. Beschikbaarheid van historische data is afhankelijk van de RVO-publicatiecyclus.


Licentie

MIT Β© 2026 Contributors β€” github.com/HASUniversity/NDVItoTaskmap


English

NL | EN

A browser-based tool for generating variable-rate prescription task maps from multispectral NDVI GeoTIFF drone imagery.

No build step, no account needed β€” clone the repo, start a local web server, and open the app in your browser.


Features

  • GeoTIFF upload β€” Supports WebODM/ODM multispectral, pre-calculated NDVI, and DJI Terra RGB Plant Health exports.
  • Automatic band detection β€” Detects Red, Green, NIR, and RedEdge via wavelength metadata or ODM convention; manual override available.
  • 20+ vegetation indices β€” NDVI, GNDVI, NDRE, SAVI, WDVI, EVI, VARI and more. Select the index in the UI; the required bands are auto-selected.
  • WDVI soil line parameter β€” The soil correction factor a of the Weighted Difference Vegetation Index is adjustable via a slider (0.50–1.80) with presets for sand, clay and organic soils.
  • Adjustable resolution β€” Slider from 512–8192 px controls the raster loading resolution. Higher values give more accurate index calculations.
  • Parcel clipping β€” The index overlay and histogram are automatically clipped to selected parcels. Colour scale and legend remain consistent with the full raster.
  • BRP parcel integration β€” Loads live Dutch agricultural field boundaries via PDOK WFS; click to select parcels.
  • Crop history β€” Displays annual crop registrations per parcel from BRP data.
  • Index histogram β€” Visual distribution of index values across the parcel with class boundaries overlaid.
  • Auto-classify β€” Divides classes automatically into equal-area index buckets.
  • Driving direction β€” North-South button or auto-optimal direction based on the longest parcel edge; live task map preview.
  • Export formats β€” Shapefile, ISOXML TaskData, GeoJSON, and CSV (see table below).
  • Fully offline-capable β€” All vendor libraries bundled; no internet required after clone (except live PDOK data).

Export Formats

Format Filename Compatible with
Shapefile name.zip ArcGIS, QGIS, John Deere Operations Center, Trimble Ag Software, CNH AFS
ISOXML TaskData name_TASKDATA.zip ISOBUS task controllers β€” John Deere, Fendt, Claas, AGCO, CNH, Topcon, Trimble
GeoJSON name.geojson Web GIS, Mapbox, QGIS, Leaflet
CSV name.csv Excel, FMIS, Agromanager, any spreadsheet

ISOXML implements ISO 11783-10 (TASKDATA.XML + binary GRD grid) and is directly loadable on any ISOBUS-compatible tractor terminal.


Supported GeoTIFF Types

Type Detection method
WebODM / ODM 5-band Wavelength metadata (NIR 840 nm, R 650 nm, etc.)
DJI Mavic Multispectral Band name metadata (Red, Nir)
Generic multispectral Reflectance heuristic (NIR typically has the highest mean)
Pre-calculated NDVI Single-band float32 GeoTIFF
DJI Plant Health / Terra RGB colour map (proxy NDVI via G/R channel ratio)

Tech Stack

Library Purpose
Leaflet.js Interactive map visualisation
GeoTIFF.js TIFF parsing with overview-aware lazy reading
proj4js CRS conversions (RD New, UTM, WGS84)
Turf.js Spatial analysis β€” grids, intersection, centroid, area

Pure HTML, CSS, and vanilla JavaScript. No frameworks, no Node.js, no build tooling. Application logic is split into ES modules (static/*.js) loaded natively by the browser.


Quick Start

git clone https://github.com/HASUniversity/NDVItoTaskmap.git
cd NDVItoTaskmap

Note: The app uses ES modules (import/export). Browsers block module loading over the file:// protocol. Start a local web server:

# Python (built-in, no install needed)
python -m http.server 8080

# Node.js
npx serve .

# VS Code: use the "Live Server" extension (right-click β†’ Open with Live Server)

Then open http://localhost:8080 in Chrome, Firefox, or Edge.


Project Structure

NDVItoTaskmap/
β”œβ”€β”€ index.html              # Single HTML page; loads vendor scripts and app.js
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ app.js              # ES module entrypoint β€” imports and initialisation
β”‚   β”œβ”€β”€ state.js            # Shared application state and constants
β”‚   β”œβ”€β”€ utils.js            # Helpers (loading overlay, toast, coordinate transforms)
β”‚   β”œβ”€β”€ map.js              # Leaflet map, base layers, layer control, legend
β”‚   β”œβ”€β”€ steps.js            # Wizard step navigation
β”‚   β”œβ”€β”€ geotiff-loader.js   # GeoTIFF upload, band selection, resolution slider
β”‚   β”œβ”€β”€ ndvi.js             # Colour ramps, NDVI rendering, histogram, auto-classify
β”‚   β”œβ”€β”€ brp.js              # BRP WFS loading, parcel selection, crop history
β”‚   β”œβ”€β”€ taskmap.js          # Class editor, task map generation, driving direction
β”‚   β”œβ”€β”€ export.js           # CSV, ISOXML, Shapefile, and GeoJSON export
β”‚   β”œβ”€β”€ i18n.js             # Internationalisation (NL/EN)
β”‚   β”œβ”€β”€ styles.css
β”‚   └── vendor/             # Bundled third-party libraries (no CDN dependency)
β”‚       β”œβ”€β”€ leaflet.js / leaflet.css
β”‚       β”œβ”€β”€ geotiff.js
β”‚       β”œβ”€β”€ proj4.js
β”‚       └── turf.min.js
└── LICENSE

Workflow

  1. Load GeoTIFF β€” Drag and drop a multispectral .tif into the browser or click to upload.
  2. Index & Bands β€” Choose a vegetation index (NDVI, GNDVI, NDRE, SAVI, or OSAVI), set the desired resolution, and click Calculate. Bands are auto-detected.
  3. Select Parcels β€” Zoom to level 14+; BRP parcels load automatically. Click a field to select. The overlay and histogram are automatically clipped to the selected parcel(s).
  4. Configure Task Map β€” Set grid size, unit, driving direction, and dosage classes. Use auto-classify for equal index distribution across classes.
  5. Export β€” Download in your preferred format for the tractor terminal or FMIS.

Data Sources

Parcel boundaries and crop registrations are retrieved live from PDOK via the BRP Gewaspercelen WFS. Historical data availability depends on the RVO publication cycle.


License

MIT Β© 2026 Contributors β€” github.com/HASUniversity/NDVItoTaskmap

About

Open-source browser-tool voor variabele taakkaarten uit drone-NDVI. Directe GeoTIFF-parsing, automatische banddetectie (WebODM/DJI) en live BRP-koppeling via PDOK. Genereert FMIS-ready Shapefiles met automatische rijrichting-alignatie. No-build, no-server, offline-capable. Stack: Vanilla JS, Leaflet, GeoTIFF.js, Turf.js.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages