I am trying to calculate NDVI from Landsat 4-5 TM imagery (of the year 2008) using the formula NDVI = (band4-band3)/(band4+band3) from Raster Calculator of ArcGIS 10.4.1.
The problem that I am facing is that the resultant raster that I am getting has integer values. I want float values that stretch from -1 to +1.
How can I resolve the issue?
1 Answer
You need to ensure the output raster contains floating point bit depth. Here is how you would accomplish that in the raster calculator:
(Float(B4)-Float(B3))/(Float(B4)+Float(B3))
If you do not explicitly define floating point values in your equation, ArcGIS will assume you want integer values.
-
Hi!! I tried this but it is showing Map Algebra error. So, I tried putting formula like this.: (Float("B4" - "B3")) / (Float("B4" + "B3")) , which worked perfectly. This resolved my issue. Thank you for helping. Apr 3, 2018 at 4:59