Extract by Mask generating on-disk output raster (?)

508
0
04-10-2014 01:12 PM
PaulSimpson
New Contributor III
Hi folks.  I am using desktop 10.0.  I'm trying to improve some performance issues and Extract By Mask is a major choke point.  Running the following code:

        arcpy.env.scratchWorkspace = "in_memory"
        RasterSelection = arcpy.sa.ExtractByMask(infile, inmask)


produces the error:

ExecuteError: ERROR 010302: Unable to create the output raster: in_memory\Extract_Dec_1
ERROR 010067: Error in executing grid expression.
Failed to execute (ExtractByMask).


If the workspace is left empty (uses defaults) or is set to the gdb that the original raster is in, then it completes successfully.

Is there something in my setup that is making it do this?  I thought ExtractByMask was supposed to generate an in_memory raster regardless.  Why would it write to the scratch workspace at all?

I'm not a raster expert by any means.  I do try to use objects rather than on-disk references as much as possible.  I also just leave the raster format to its default and place them in GDBs, which organizes the file system in a way that works for our group.

Thanks in advance.

Paul
0 Kudos
0 Replies