[mapserver-users] How reproduce a false color NDVI.

Even Rouault even.rouault at spatialys.com
Sun Mar 1 01:35:47 PST 2015


Le dimanche 01 mars 2015 10:17:34, Andrea Peri a écrit :
> Hi,
> we have a set of tiffs georef with 4th bands of color RGB and Infrared.
> We need to activate a wms with the color from the NDVI index
> 
> NDVI = Normalized Difference Vegetation Index
> 
>           NIR - RED
> NDVI = -------------
>           NIR + RED
> 
> 
> Where NIR is the 4th band,
> RED s the 1th band.
> 
> We prefer dont' do a physical float raster, but retrieve this realtime from
> the original tiffs.
> 
> I try to reproduce this index NDVI using to a LUT table in MapServer,
> but without any success.
> There is some other solution to obtain this on mapserver.

Andrea,

It turns out that the same question was asked more than 10 years ago : 
http://lists.osgeo.org/pipermail/mapserver-users/2004-July/053754.html

Since them, GDAL has the VRT format. With derived bands (described near the 
end of http://gdal.org/gdal_vrttut.html), you could do that but that requires 
writing a custom function in C, which isn't very convenient for integration 
with MapServer. It would be nice to add the capability of writing pixel 
functions in Python.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com



More information about the MapServer-users mailing list