[Mapserver-users] proccessing 4-Band Tiif

Frank Warmerdam warmerdam at pobox.com
Thu Jul 29 13:41:07 EDT 2004


Aaron D. Hunt wrote:
> Can I use mapserver to make a NDVI map from a four band tiff.
> ie.
> NDVI = (Band 4 - Band 3)/(Band 3 + Band 4)
> 
> Or does anybody know of a program that can.

Aaron,

There is no way to do this kind of calculation directly in MapServer.
There are lots of programs that can do it externally such as GRASS or
various commercial offerings.  You could also write a Python script that
uses GDAL to read and write the results and "Numeric" to do the computation.

Within GDAL the gdal/pymod/samples/fft.py script shows how to use GDAL and
Numeric to compute an FFT.  NDVI should be somewaht simpler.

Someday I would like to implement a kind of "virtual file" in GDAL where you
can supply Python expressions for how the results should be computed from
other source files but that is a ways out.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the mapserver-users mailing list