gp = arcgisscripting.create() # Check out any necessary licenses gp.CheckOutExtension("spatial")
gp = arcgisscripting.create() # Check out any necessary licenses gp.CheckOutExtension("spatial")
Process: Extract by Rectangle # Ref: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z0000002r000000.htm #get the rectangular boundary of the WS shape file shapeFileDesc = arcpy.Describe(BufferedWSFile) wsBoundingBoxExtent = Extent(shapeFileDesc.extent.XMin, shapeFileDesc.extent.YMin, shapeFileDesc.extent.XMax, shapeFileDesc.extent.YMax) gp.ExtractByRectangle_sa(OriginalNLCDDataSetFile, wsBoundingBoxExtent, ExtractedNLCDFile, "INSIDE")
I get the mentioned error when executing the highlighted statement above. I have done similar extraction coding and they all run fine. The only difference I know in this case is the file format and size. The original nlcd file is of .img format in this code example. The similar code to extract that has worked for me have file formats of .tif.
PK, You create a variable called "ExtractedNLCDFileName" for your output raster, then as an argument for your out_raster you use "ExtractedNLCDFile". Regards, Jim