8
最大限度地利用CPU
我的脚本是将线与多边形相交。因为有3000多个线和500000多个多边形,所以这是一个漫长的过程。我从PyScripter执行: # Import import arcpy import time # Set envvironment arcpy.env.workspace = r"E:\DensityMaps\DensityMapsTest1.gdb" arcpy.env.overwriteOutput = True # Set timer from datetime import datetime startTime = datetime.now() # Set local variables inFeatures = [r"E:\DensityMaps\DensityMapsTest.gdb\Grid1km_Clip", "JanuaryLines2"] outFeatures = "JanuaryLinesIntersect" outType = "LINE" # Make lines arcpy.Intersect_analysis(inFeatures, outFeatures, "", "", outType) #Print end …