1

I'm trying to run a batch operation on raster calculator. The expression I use is this:

(Float("92011033_B2.tif") - Float("92011033_B5.tif")) / (Float("92011033_B2.tif") + Float("92011033_B5.tif"))

And at the moment of executing it throws me the following error:

ERROR 00539: Error running expression: rcexec ().

1

I assume you have entered your equation manually?

In ArcGIS 10.5 If I build this simple equation in the Raster Calculator tool this is what is submitted:

"Float("LE71370452001333SGS00_B5.TIF") - Float("LE71370452001333SGS00_B2.TIF")"

What is actually submitted and executed is this:

Float(Raster(r"LE71370452001333SGS00_B5.TIF")) - Float(Raster(r"LE71370452001333SGS00_B2.TIF"))

As you can see it encloses the raster names within Raster() which we are not seeing in your code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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