0

I am trying to intersect a large feature class (118692 elements) with a grid (58000 elements) but I get an error message.

Traceback (most recent call last):
  File "Path/InterJoin.py", line 24, in <module>
    arcpy.Intersect_analysis([grid, fc], outFeatureClass, "ALL", "", "")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\analysis.py", line 289, in Intersect
    raise e
arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
The table was not found.
The table was not found. [BDFORET_Buffer_30_1_Inter_Com_Results_Hexagones]
The table was not found.
The table was not found. [BDFORET_Buffer_30_1_Inter_Com_Results_Hexagones]
Invalid Topology [Topoengine error.]
Failed to execute (Intersect).

I used repair geometry but I still got that error, my computer is I think powerful enough to handle the dataset (32G of RAM).

My code may not be optimized i guess.

import arcpy
import os
import ntpath


arcpy.env.workspace = Path to my workspace
outWorkspace = path to my out workspace
grid = path to my grid

arcpy.env.overwriteOutput = True

fcl = arcpy.ListFeatureClasses()

print fcl

for fc in fcl:
    featureClassName = arcpy.ValidateTableName(fc, outWorkspace)
    outFeatureClass = os.path.join(outWorkspace, featureClassName + "_Inter_Grid")
    os.path.join(outWorkspace, outFeatureClass + "_Dissolve")
    arcpy.Intersect_analysis([grid, fc], outFeatureClass, "ALL", "", "")
    arcpy.Dissolve_management(outFeatureClass, outFeatureClass_Dissolve, "CODE", "", "MULTI_PART",
                              "DISSOLVE_LINES")
    outFeatureClassTest = ntpath.basename(outFeatureClass)
    print outFeatureClassTest

So far I know it is not due to the geometry of my feature classes, but I think I might be a memory problem.

5
  • 1
    If you have pasted your code as is, then it has the problem. "_Di string does not end and then you start running the Intersect. So, it cannot find a table. Commented Feb 6, 2018 at 11:21
  • This is unlikely to be a memory issue. It is likely to be a file geodatabase corruption issue. Your code doesn't give any indication of where the error could be, nor does the error message, so you haven't given us enough to help you.
    – Vince
    Commented Feb 6, 2018 at 11:28
  • @AlexTereshenkov I made a mistake while coping the code here it should be : outFeatureClass_Dissolve = os.path.join(outWorkspace, outFeatureClass + "_Dissolve").
    – Victor A
    Commented Feb 6, 2018 at 12:28
  • Does it fail when you intersect them in ArcMap?
    – Bera
    Commented Feb 6, 2018 at 12:40
  • Yes same message : ERROR 999999: Error executing function. The table was not found. The table was not found. [Test] The table was not found. The table was not found. [Test] Invalid Topology [Topoengine error.] Failed to execute (Intersect).
    – Victor A
    Commented Feb 6, 2018 at 12:52

1 Answer 1

2

Is your grid named 'BDFORET_Buffer_30_1_Inter_Com_Results_Hexagones'? If so, check this bug:

Bug NIM058393 - Intersect geoprocessing tool fails when the input feature class has a name longer than 26 characters.

Try renaming your grid with a shorter name and see if it works.

1
  • Still got the same problem even when the past is shorter (25 characters)
    – Victor A
    Commented Feb 6, 2018 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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