10.3.1 raster calculator, workspaces, and file names! Problems!

2361
2
Jump to solution
11-20-2015 08:36 AM
AlisonSchilling
New Contributor III

I am running a raster through raster calculator in .img format. The outputs are just wrong! No ERROR. Since this did not make sense both the initial input raster was imported into a file geodatabase, and the output raster location is a geodatabase. Since this is being performed in a model. I have a workspace set to be the output location. Here is the stranger part....IF the output is selected as %Output Location%/outputrasterthat_Iwant_tocreate it fails based on the file name being too long. IF the output is selected as the output path /this/is/the/path/mygeodatabase.gdb/outputrasterthat_Iwant_tocreate  IT all works fine. I cannot write my path into my model as this is for a client and all my other models have workspaces. IF the output is selected as %Output Location%/myfile (I am using a very short filename) IT works great, however again, I am sending this to client and it needs to have a standard name. I should not even need the the geodatabases as we are migrating 10.1 models to 10.3.1.....HELP please.....

0 Kudos
1 Solution

Accepted Solutions
AlisonSchilling
New Contributor III

We have figured out the solution. The workspace needs to have the .gdb at the end of name. We have not figured out why raster calculator does not process correctly but if we identify the workspace as %Output Location.gdb%/ourname_can_beas_longas_required. This meets all of our client needs. We would still like this model to work as it did in 10.1 and NOT need a geodatabase at all.

View solution in original post

0 Kudos
2 Replies
curtvprice
MVP Esteemed Contributor

Alison,

Your raster output to folders (not geodatbases) are written in Esri grid format when you don't specify a file extension, which must have short names (< 13 chars, start with a letter, no spaces).  This is a limitation of that file format.

Esri Grid format—Help | ArcGIS for Desktop  (look under "Storage Limitations")

If your output has to go to a folder and you need longer file names, use the .tif format by specifying .tif in the path, for example: %Output Location%/outputrasterthat_Iwant_tocreate.tif

AlisonSchilling
New Contributor III

We have figured out the solution. The workspace needs to have the .gdb at the end of name. We have not figured out why raster calculator does not process correctly but if we identify the workspace as %Output Location.gdb%/ourname_can_beas_longas_required. This meets all of our client needs. We would still like this model to work as it did in 10.1 and NOT need a geodatabase at all.

0 Kudos