Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a script that runs Tabulate Area on a single feature class multiple times with different rasters. In total Tabulate Area runs 5 times. 2 of the input rasters are provided as arguments to the script and Tabulate Area works as expected. The other 3 rasters are results of raster functions (i.e. Reclassify, SetNull, EucDistance, etc.).

Every time I run the script, Python crashes when trying to run Tabulate Area on one of those preprocessed rasters. It happens on a different raster every time, seemingly randomly. There is no error message, Python simply crashes. When I hit Get Details in the generic Windows error dialog, it seems like there is a different Fault Module every time as well.

When I try to run Tabulate Area manually in ArcCatalog, ArcCatalog crashes and asks if I want to send a report to ESRI. Again, no error message.

UPDATE:

Here is some of the code involved:

def GetBuffer(inRaster, lcClass, bufDist, ringBuffer=True):

    setnull = SetNull(inRaster, 1, "Value <> " + str(lcClass))

    dist = EucDistance(setnull, bufDist)

    buf = Reclassify(dist, "Value", RemapRange([[0, 100, 1], ["NODATA", 0]]))

    if ringBuffer:

        reclass = Reclassify(setnull, "Value", RemapValue([[0, 0], [1, 1], ["NODATA", 0]]))

        ring = arcpy.gp.Minus_sa(buf, reclass)

        return ring

    else: return buf

def SubtractRaster(inRaster1, inRaster2):

    sub = arcpy.gp.Minus_sa(inRaster1, inRaster2)

    setnull = SetNull(sub, 1, "Value <> 1")

    return setnull

lcRaster = arcpy.Raster(landcover)

treecanopy = GetBuffer(lcRaster, TreeCanopyClass, TreeCanopyBuffer, False)

parkinglots = SubtractRaster(GetBuffer(lcRaster, ParkingLotClass, ParkingLotBuffer), treecanopy)

buildings = SubtractRaster(GetBuffer(lcRaster, BuildingClass, BuildingBuffer), treecanopy)

impervious = SubtractRaster(GetBuffer(lcRaster, ImperviousClass, ImperviousBuffer), treecanopy)

...

TabulateArea(fc, "GID", parkinglots, "Value", plTabArea , 1)

TabulateArea(fc, "GID", buildings, "Value", buildTabArea , 1)

TabulateArea(fc, "GID", impervious, "Value", impTabArea , 1)

UPDATE 2:

I installed ArcGIS 10.1 Service Pack 1 after seeing bugs related to Tabulate Area in 10.1. When I first ran the script with SP1, it worked. When I ran it again later, I had the same issue where Python simply crashed without providing an error message.

share|improve this question
    
Could you post your script? –  Aaron May 15 '13 at 22:21
    
@Aaron - I've added some of the code in an update to the post. –  Brian May 16 '13 at 14:55
    
I would put some arcpy.GetMessage... lines in your code to provide some feedback so you at least know where it is failing of no errors are being reported. –  Dan Patterson May 16 '13 at 15:21
    
@DanPatterson - I actually had print statements in there, but I took them out for the code sample so it wouldn't be as cluttered. That's how I know it is failing at the one of the 3 TabulateArea calls (and a different one of the 3 each time). –  Brian May 16 '13 at 15:24
    
Then could you provide the results of the print statements Brian so the line of failure can be examined? –  Dan Patterson May 16 '13 at 15:25

2 Answers 2

You are running 10.1; have you installed any service packs? There is a list of bugs found for "tabulate area crashes" from esri's support page. Check to see if any apply to you, or check other searches about the tool.

share|improve this answer
    
I hunted for bugs and did not find any directly related to this, but apparently I wasn't looking in the right place. I installed ArcGIS 10.1 SP1 and it worked just fine. Next is to play around with the new 64bit background processing capabilities. Thanks. –  Brian May 16 '13 at 19:14
    
Sorry, false alarm. It worked the first time I ran it and then upon more testing, I'm getting the same issue again even with SP1. –  Brian May 16 '13 at 19:45
    
Do you save the rasters subtraction, getBuffer, etc? And do they have attribute tables? check this –  gm70560 May 16 '13 at 19:55
    
I don't save the intermediate rasters, but I do save the result of the SubtractRaster calls. According to the link you provided, which I have seen before, that attribute table is only needed for the zone data, which in this case is vector. All my rasters do have an attribute table as well. –  Brian May 16 '13 at 19:59

I had the same issue and fixed it by (re)building the attribute table just before tabulating the area in my script:

arcpy.BuildRasterAttributeTable_management(ClassData, "Overwrite")

TabulateArea(ZoneData, zoneField, ClassData, ClassField,  TablePath, processCellSize)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.