Leaflet Raster
A simple plugin for powerful raster functions.
This plugin makes it easy to add powerful raster processing to your Leaflet map, running directly in the browser. Examples can be hill shading, vegetation index analysis (NDVI for example) and much more.
The plugin by itself is very small and does very little. Its purpose is to function as the glue between Leaflet and powerful libraries like GeoTIFF.js and raster-blaster.
A small example using both GeoTIFF.js and raster-blaster:
const pipeline = // VARI vegetation index '($g - $r) / ($g + $r - $b)' // Stretch histogram to between index 0.2 to 0.8 02 08 // Map grayscale to color scale Red-Yellow-Green 'RdYlGn' // Copy alpha band directly to alpha channel 'a' bands: 'rgba' dataType: 'Uint8' const renderer = const renderFn = renderer GeoTIFF