# Why does the raster calculator only give out 1 and 0 values?

1071
5
12-17-2018 05:46 AM
New Contributor II

I have a problem with the raster calculator of ArcMap 10.5.1 because it only gives out a raster with 0 an 1 values. I'd like to calculate the Leaf Area Index out of a NDVI-Raster by using this equation:

LAI = (((1+NDVI)/(1-NDVI))*NDVI)^0.5

I already have a raster with the NDVI values ranging from approx. -0.699 to approx. 0.823. The Pixel type is floating point.

In the raster calculator I used the following expression:

(((1+"NDVI.img")/(1-"NDVI.img"))*"NDVI.img")^0.5

where "NDVI.img" is the raster file I named above. I looked at the graph of the equation and it should give out decimal values higher than 0, but I only get a raster file full of 0 and no stretched values. Can you tell me what I did wrong?

PS.: The output raster that gets created has the pixel type integer even if I set it to float beforehand.

Tags (5)
5 Replies
Esri Esteemed Contributor

Could you try to do this:

``(((1.0 + "NDVI.img")/(1.0 - "NDVI.img")) * "NDVI.img")^0.5‍‍``
New Contributor II

Thank you for your answer. I tried that but it didn't change the result.

New Contributor II

Another page could help me with the problem. So here is the solution if someone else has troubles like this: I used the operator ^ which is the "Boolean XOr operator" and it only returns 0 and 1 values. I wrote SquareRoot(...) around the equation instead and it worked just fine.

New Contributor

Your input raster may have a "Signed Integer" pixel type. If you want it to become float, add Float("your raster here") command on the raster calculator.

New Contributor III

Do you know the reference of the LAI formula mentioned in your question?