r1.save(outloc)
x = r1 + r2
x.save(outloc)
I have this same problem. Lots of rasters using in_memory. I have even used arcpy.Delete_management to remove them when i am done, but I still get this error.
I am working with a large number of temporary rasters. Individually they can be saved simply and without issue like r1.save(outloc) However, if they are combined in any way -e.g. x = Raster(r1) + Raster(r2) and the result saved x.save(outloc) I receive the following error "RuntimeError: ERROR 010240: Could not save raster dataset to in_memory\times_ras1 with output format MEM." If I save -all- the temporary rasters before they are combined the final rasters save without issue. Any thoughts?
x = Raster(r1) + Raster(r2)
arcpy.AddMessage(str(r1)) arcpy.AddMessage(str(r2)) x = r1 + r2 arcpy.AddMessage(str(x))
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.