Folks, I am having the error message "ERROR 010152: Object IGeoDataset is null. Failed to execute (TabulateArea)" while executing batch tabulate area script. The function of the script is to get raster datasets from the workspace and calculate tabulate area for each raster using a zonal feature data (shape file). I have attached this script with a tool. Problem is I get this error message, I don't know why and where is it coming from. But if I execute the script line by line in the Python window, I get the result (except that GetParameterAsText functions are replaced by the actual paths). Any help?? BTW I am using ArcGIS 10 with Service Pack 3 installed. # calculates TabulateArea statistics in batch mode # it uses a shape file as the zone feature, takes multiple rasters from the workspace (inWorkspace) and return the calculated TabulateArea stat for each raster in outWorkspace folder import arcpy import os from arcpy import env arcpy.CheckOutExtension("spatial") zoneFeature = arcpy.GetParameterAsText(0) inWorkspace = arcpy.GetParameterAsText(1) outWorkspace = arcpy.GetParameterAsText(2) env.Workspace = inWorkspace # Loop through a list of feature classes in the workspace and calculate TabulateArea stat for each raster for rc in arcpy.ListRasters(): # Set the output name to be the same as the input name, and # locate in the 'outWorkspace' workspace output = os.path.join(outWorkspace, rc) arcpy.gp.TabulateArea_sa(zoneFeature, "STEWARDLEV", rc, "VALUE", output, 30) Thanks Aminul
... View more