laptop and a wrench

Bug

Clip and other overlay operations run indefinitely with a particular line on a poly case.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM090113
SubmittedMarch 27, 2013
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found10.1
Version Fixed10.2.1
StatusFixed

Workaround

To get a simplified, Intersect-like output (though not fully integrated or topologically complete across the entire extent of the data): import arcpy, os, sysarcpy.env.workspace = os.getcwd()arcpy.MakeFeatureLayer_management(r"Data.gdb\NEW_lines","lines")arcpy.MakeFeatureLayer_management(r"Data.gdb\NEW_fishnet","grids")arcpy.env.overwriteOutput = Truearcpy.CreateFileGDB_management(os.getcwd(),"output.gdb")try: #For each grid in the poly feature class, select it, select the lines that intersect it, then clip it with the selected grid. gridCount = int(arcpy.GetCount_management('grids')[0]) progressCounter = 1 with arcpy.da.SearchCursor("grids", "Cell_ID") as cursor: for row in cursor: print "\n\nGrid # " + str(progressCounter) + " of " + str(gridCount) print "Processing Cell_ID = " + str(row[0]) arcpy.SelectLayerByAttribute_management('grids',"","Cell_ID = " + str(row[0])) print "Selecting the lines..." arcpy.SelectLayerByLocation_management("lines","INTERSECT","grids","","") #print arcpy.GetMessages() print "Clipping the selected lines with the selected grid..." arcpy.Clip_analysis("lines","grids",r"output.gdb/LinesInCellID" + str(row[0])) #print arcpy.GetMessages() print "Add identification field..." arcpy.AddField_management(r"output.gdb/LinesInCellID" + str(row[0]),"Cell_ID", "LONG") #print arcpy.GetMessages() print "Assign grid id to field..." arcpy.CalculateField_management(r"output.gdb/LinesInCellID" + str(row[0]), "Cell_ID", str(row[0])) #print arcpy.GetMessages() progressCounter +=1 print "Merge all the outputs..." arcpy.env.workspace = os.path.join(os.getcwd(), r"output.gdb") fcList = arcpy.ListFeatureClasses() arcpy.Merge_management(fcList,r"output.gdb/mergedFC") print "DONE" #print arcpy.GetMessages() except: print "FAILED" print arcpy.GetMessages()

Steps to Reproduce

Bug ID: NIM090113

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options