laptop and a wrench

Error

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

Última publicación: August 25, 2014 No Product Found
Número de ID del error NIM090113
EnviadoMarch 27, 2013
Última modificaciónJune 5, 2024
Relacionado conNo Product Found
Versión encontrada10.1
Versión corregida10.2.1
EstadoFixed

Solución alternativa

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()

Pasos para reproducir

ID del error: NIM090113

Software:

  • No Product Found

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga