我正在使用以下功能:
def LAS2TXTGridClip(inFile,poly,MinPoints=1):
sf = shapefile.Reader(poly) #open shpfile
sr = sf.shapeRecords()
poly_filename, ext = path.splitext(poly)
inFile_filename = os.path.splitext(os.path.basename(inFile))[0]
for i in xrange(len(sr)):
verts = np.array(sr[i].shape.points,float)
record = sr[i].record[0]
inside_points = [p for p in lasfile.File(inFile,None,'r') if pnpoly(p.x, p.y, verts)]
if len(inside_points) >= MinPoints:
file_out = open("{0}_{1}_{2}.txt".format(poly_filename, inFile_filename, record), "w")
for p in inside_points:
file_out.write("%s %s %s %s %s %s %s %s %s %s %s" % (p.x, p.y, p.z, p.intensity,p.return_number,p.number_of_returns,p.scan_direction,p.flightline_edge,p.classification,p.scan_angle,record)+ "\n")
file_out.close()
该for i in xrange(len(sr)):
函数将被处理多次。大约是 50 万,len(sr)
我希望插入一个进度条,以便了解我需要等待的时间(现在是星期五)。我有以下问题:
- 哪个是 Windows OS 64 位上 python 27 的“最佳和简单”进度条?
- 我找到了进度条模块,但在这一步之后我无法使用 easy_install 进度条。
- 插入进度条的最佳位置在哪里?