xander_bakker

Define the output name of a raster using SA and Python

Discussion created by xander_bakker on Oct 26, 2011
Latest reply on Nov 7, 2011 by xander_bakker
There is a thing that I simply don???t understand or what I am not willing to accept. When using ArcPy.sa to create raster output in the Python window, the name the raster is given in the workspace (in my case a fgdb) is based on the function applied (e.g. ifthe_ras* when using a Con statement, or FocalSt_* when using focal statistics, etc).
  
  What I would really like (and I know I don???t stand alone in this) is that the name I have assigned when executing the command is used for the name of the raster in my output workspace.  Use the env.overwriteOutput setting and when the output raster exists and should not be overwritten throw an error. But please don???t make my script twice as long since after every command:

myRaster = Some ArcPy.sa command 

I have to say

myRaster.save("myRaster").:mad:
  
  I???m glad that ArcGIS 10(.1) is a lot more stable than the 9.4 beta. When I was using 9.4, I regularly ended up with a crash and a fgdb filled with a lot of rasters for which it was impossible to derive what they were based on???
  
  Should I submit this in the ideas section, or can we just consider this a bug, that can be resolved in the next release?

Attachments

Outcomes