AnsweredAssumed Answered

Extract by Mask Problem

Question asked by donalkc on Jul 11, 2013
Latest reply on Jul 12, 2013 by donalkc
Hi all,

I'm having a bit of trouble with using the Extract by Mask functionality. I have a Python code that creates a file GDB and then I import shapefiles to the GDB. I then create a new raster dataset within the file GDB and then mosaic 4 .tiff into it. The problem occurs when I try to 'Extract by Mask' using the new raster dataset as the input and a polygon as the mask. I get an error stating that:

'AttributeError: 'module' object has no attribute 'ExtractByMask''

I have imported the spatial analyst extension and below is the code that I'm trying to use:

# Set local variables in_raster = "C:/Users/D/Prog_Assign.gdb/R_Dataset" in_mask_data = "C:/Users/D/Prog_Assign.gdb/Study_area_extent_shp" #Extract by Mask arcpy.ExtractByMask (in_raster, in_mask_data) # Save the output outExtractByMask.save("C:/Users/D/Prog_Assign.gdb/T_Mask")


Any help or advice would be greatly appreciated!

Outcomes