laptop and a wrench

Erro

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

Última Publicação: August 25, 2014 No Product Found
Número de ID do Erro NIM090113
EnviadoMarch 27, 2013
Última ModificaçãoJune 5, 2024
Aplica-se àNo Product Found
Versão encontrada10.1
Versão Fixa10.2.1
StatusFixed

Solução Provisória

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

Etapas para Reproduzir

ID do Erro: NIM090113

Software:

  • No Product Found

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download