0

I have acquired Landsat 8 data from earthexplorer; I got band 5 and 4 only as they are the necessary bands to calculate the NDVI. I've followed every YouTube video and article online with no chance of getting the correct results. my formula is the following :( band 5 - band 4 )/( band 5 + band 4) the results I get are in the pictures; a white cutout of the map I used as a mask and very extreme low values.

I'm getting results like this question.

Solutions I tried involved downloading other datasets but no good. I noticed when I used GDAL calculator it produced an error message saying there is division by zero.

the results I get, notice the extreme low value the equation i type into raster calculator

these are the values of my band5 and 4 rasters, I'm not sure if they are 'normal' or not. band 4 statistics from QGIS band 5 statistics from QGIS

It's worth noting am very new to GIS and spatial data analysis. Addition information: software: QGIS 3.36.2-Maidenhead

NB: it is stated that Landsat collection 2 level 2 had problems

3
  • What do the individual input bands look like? Are their values reasonable? Hard to tell if your output is correct if you don't show us the input. It looks to me like outside your clip area you have some "nodata" values, typically large negative or positive numbers, but QGIS doesn't know, so interprets them as valid band values.
    – Spacedman
    Commented May 27 at 12:32
  • i modifed the question and included the values of my bands. i don't know whether they fall into the 'normal' range or not. Also, even if i don't clip the rasters and try and calculate the NDVI i get the same error.
    – yac ine
    Commented May 27 at 12:37
  • @Spacedman that is correct i guess, if i type "band5" <0 in the raster calculator i get a black bounding box with value = -3.4028234663852886e+38. so how do i fix this?
    – yac ine
    Commented May 27 at 14:33

1 Answer 1

0

The solution was simple: When calculating the NDVI, save your raster. I used to leave it as temporary file which produced the error.

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.