I would like to calculate NDSI index (Normalized-Difference Snow Index) which basically is the same as NDVI but presents snow not vegetation :). As in NDVI the range of values for NDSI should be <-1, 1>. However, after application TOA correction values of NDSI extend range <-1,1> and it's difficult to find treshold for snow because most of the NDSI values are cummulated in range <0.9,1>. In publications I've found the treshold value as ~0.4 which is almost impossible to find on my images.

I calculated NDSI also for DN values and everything seems to be fine - range of NDSI values is <-1,1>, treshold ~0.4. But I would like to apply TOA correction because in next stage I'll compare NDSI images from different acquistition time.

I've tried different software to do the analysis: PCI Geomatica, ArcMap, RStudio... Results are the same...

1 Answer 1


I recommend you to use surface reflectance Landsat scenes. TOA reflectance of green layer has strong atmospheric interference, so you need to work with a corrected image (images are free, only submit an orden in EarthExplorer)

Take in account that some pixels will be out of range or NA, it depends of DOY, zone and image's quality (derived from cloud cover).


test <- stackMeta("/path/to/LC82330822016159LGN00.xml") # path/row 233/82

NDSI <- function(green, swir1){

NDSI.result <- overlay(test[[3]],test[[6]], fun = NDSI)



Also, the cumulative distribution is the same one than yours:


enter image description here

  • great example! Wht not use a built-in dataset to make your example reproiducible though? mtlFile <- system.file("external/landsat/LT52240631988227CUB02_MTL.txt", package="RStoolbox"); test <- stackMeta(mtlFile)
    – Matifou
    Commented Nov 16, 2016 at 22:55
  • I have two reasons. First, surface reflectance product comes with two metadata files, classic MTL.txt and .xml file. MTL doesn't work as easy as you show with stackMeta(), because it has L1 data information. .xml file comes with atmospheric corrected parameters, like scale factor or QA bit flags. Second, build-in dataset have no snow, so, it isn't a good example for NDSI.
    – aldo_tapia
    Commented Nov 16, 2016 at 23:27
  • Fair point, my bad for the comment!
    – Matifou
    Commented Nov 17, 2016 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.