NB (05/07/07), Arjen Markuspost on Analysing geographical data with NAP prompted me to get off my duff and add some of the ways we are using NAP for raster ananlysis.
The example below shows how one can do vegetation analysis, Normalized Difference Vegetation Index (NDVI), using raster maps, which gives an indication of how much green vegetation is present in the photos.
nap "red = get_gridascii('red.ASC')";
nap "near = get_gridascii('near.ASC')";
nap_info seconds
nap "NDVI = (near-red)/(near+red)"
nap_info seconds
plot_nao NDVI -print 1 -filename NDVI_asc.jpeg
nap "red = f32 "nap_get hdf red.hdf "3-dimensional Scientific Dataset"""
$red shape nap "near = f32 nap_get hdf near.hdf "3-dimensional Scientific Dataset"" nap "NDVI = (near-red)/(near+red)" #nap_info seconds $NDVI shape plot_nao NDVI(,,0)
nap "all_bands = f32 nap_get hdf all_bands.hdf "3-dimensional Scientific Dataset"" nap "red = all_bands(,,1)" nap "near = all_bands(,,3)" nap "NDVI = (near-red)/(near+red)" plot_nao red -print 1 -filename red.jpeg plot_nao near -print 1 -filename near.jpeg plot_nao NDVI -print 1 -filename NDVI.jpeg
Here are the pictures: