I am trying to open a text file that contains one line, which is a number. I am then trying to define this as a variable to use in my raster calculation/map algebra. I am currently running on Windows 7.

Command Prompt Error

RuntimeError: ERROR 000732: Input Raster: Dataset slope1 does not exist or is not supported

input2 File


Script Example

slope1 = open('C:\Users\Apples\Documents\ArcGIS\Blueberry_Cobbler\input2', 'r').read()

outraster = ((slope1 * Power(inraster ,3)) + (slope1 * Power(inraster ,2)) + (0.0056 * inraster) + 65.864)


Just had to add float() around slope1.

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.