Spatial Analyst Extract by Polygon output doesn't save

المشرف العام

Administrator
طاقم الإدارة
I have very little experience working with raster data. Currently I'm trying to 'clip' raster data by polygons. My input raster data is the result of a Kriging geostatistical analysis I performed on a point feature class. I then used this raster as an input for the following code:

inRast = r"C:\E1B8\DASH\DASH_Data.gdb\Napa_28" #From geostatistical analysisinPoly = r"C:\E1B8\DASH\DASH_Data.gdb\Napa_Plats" #Polygons to clipuidFld = "DMP"outGdb = r"C:\E1B8\DASH\Rasters.gdb"from arcpy import *import customarc as caimport osCheckOutExtension("Spatial")cursor = da.SearchCursor (inPoly, ["SHAPE@", uidFld])for shape, uid in cursor: verticesFc = ca.UniqueFileName() #Creates unique file name FeatureVerticesToPoints_management (shape, verticesFc) pointGeoms = [pnt[0] for pnt in da.SearchCursor (verticesFc, "SHAPE@")] pointGeoms += [pointGeoms [0]] points = [p.firstPoint for p in pointGeoms] outRaster = sa.ExtractByPolygon (inRast, points) outRas = os.path.join (outGdb, uid) outRaster.save (outRas) Delete_management (verticesFc) print uidWhen I try to save the output Raster from my Extract by Polygon I get the following error:

Traceback (most recent call last): File "C:/E1B8/DASH/Save_Raster.py", line 37, in outRaster.save (outRas)RuntimeError: ERROR 010240: Could not save raster dataset to C:\E1B8\DASH\Rasters.gdb\PLAT_1-42-C02 with output format FGDBR.I don't understand why I can't save this format (FGDBR) to a file geodatabase, since the input raster is in this format within a file geodatabase. The script does work when I save the raster to a folder instead of a file geodatabase, but appear to be void of data (which is probably a subject for another question).

Any help would be great. Thanks!



أكثر...
 
أعلى