I've got two large feature classes that I'm trying to perform an intersect on. Using the following python code, I get an empty output feature class:
Yet when I use the Intersect_analysis tool from the arcMap toolbox with these same two feature classes, it performs the intersect as expected. I've used the above code as part of a script that intersects a whole bunch of feature class pairs, and it does fine with most of them, but not these two feature classes in particular.
Can anyone think of a reason that these feature classes in particular might fail where others succeeded? I can't post the data, unfortunately, as I am not authorized to distribute it.
Some more information: *The failure now appears to be intermittent. After running code above exactly as shown in the arcmap python interpreter, it failed. I entered the exact same code (changing only the output feature class name, and this time it generated the correct intersect. I didn't touch the data, nor did I change the code, nor did I even close the python window between runs. it seems completely random. Has anyone ever encountered this behavior before? Might this be an arcpy bug?
*Both feature classes are using the exact same coordinate system.
*I have a separate script that calls the line of code above, but I'm testing it in the arcmap python interpreter, and I has failed there as well.