I have some questions related to the NDVI calculation in SNAP for sentinel-2 level2A data
How can I NDVI for multiple scenes simultaneously, ie by batch processing? i tried via GraphBuldier but in the available modules there is no NDVI choice
(only outside GraphBuilder, in normal SNAP> Optical> Thematic> Vegetation Radiometric Indices menu)
if I make a graph via GraphBuldier, e.g. to count NDWI, or another pointer, and go to Batch Processing and use my graph, then regardless of the number of scenes I get only one output file. How to get the right number of NDWI rasters to the number of input data, keeping e.g. part of the name?
What will be the formula for counting NDVI for many scenes simultaneously in CMD so that the result is 10 resolution and the names are kept with the addition of ‘_NDVI’?
Outside of SNAP (sorry) you can make a shell script that
iterates over a directory containing the band 4 and band 8 JP2 images
and uses the GDAL executables called gdal_calc.py and gdaldem
to produce coloured versions of the NDVI.
For example the inner loop would do something like this:
I made a script for NDWI in graph builder
(tip: I had to do this for a dedicated file to be able to choose the resolution and output location)
then I edited the script (graph_ndwi_highOK.xml (1.3 KB) ):