I am trying to write a bit of code that combines a bunch of DEMs that match up perfectly and convert the elevation values of the pixel cells from meters to feet. This is all using Pyscripter and Python 2.7.
I found some code on stack exchange (Add two rasters in python using map algebra) that I tried to translate using my own variables, but cannot get it to work. I can create the mosaic fine, but once it gets to the Map Algebra part it crashes on the expression.
Here is my code. I pretty much took what the post had and translated using my own variables. I also tried putting the expression in eval() and it still crashed. Putting '"' + .... + '"' didn't work either.
#Convert DEM values to feet. dem_input = str(mos_wrk) + "\\" + str(mos_name) demft = dem_input*3.28084 demft.save(str(mos_wrk)+"\\"+str(demft)+"_ft")