Spectral Indices - python code

Dear All, this is a piece of python code, I named it, spectral - indices, to give you very rapid glance about any study area located in low cloud area coverage, calculation some indices gives an idea about the landuse and landcover, and also the relationship between the ground objects as the first step of any study.

Please have a look

Thanks a lot for All of you.

1 Like

Dear Falah,

thank you for sharing - this looks very useful. Can you shortly explain what input data (filetype, structure) is required by the script? Does the number and order of bands play a role (e.g. Landsat-2 and Sentinel-2 are quite different)?

Dear Andy,

Thanks a lot for your question,

The data file type should be *.tif,

The structure of the bands is different according to the subset has been done out of this code, and as you know the slice order starts with zero, so the band-1 will be 0 and 2 will be one and so on so for, this is in general,
Concerning the Landsat- of course it is different, and could be sliced according to the bands order of the image and also according to the band name, for example swin1, swin have different name in other satellite, so before hand to know the structure of the bands in the image is very important.

thank you for the explanation. Maybe you can add one example file to the repository which works for your code so peole can understand the structure of the required input prepare their data similarly.

1 Like