修改了进度打印结果

master
chenzenghui 2025-10-09 13:57:34 +08:00
parent 7226fe582f
commit acf441db4a
1 changed files with 7 additions and 7 deletions

View File

@ -55,11 +55,11 @@ def preProcessTiFF(tiffpath,txtpath,preFolderPath):
if os.system(cmdtxt) ==2: if os.system(cmdtxt) ==2:
print("sucess:",cmdtxt) print("sucess:",cmdtxt)
writeoutlog(logPath, "sucess: {}\n".format(cmdtxt)) writeoutlog(logPath, "sucess: {}\n".format(cmdtxt))
return 2 return "sucess: {}\n".format(cmdtxt)
else: else:
print("failed:",cmdtxt) print("failed:",cmdtxt)
writeoutlog(logPath, "failed: {}\n".format(cmdtxt)) writeoutlog(logPath, "failed: {}\n".format(cmdtxt))
return 3 return "failed: {}\n".format(cmdtxt)
def processMJPort(srcFolderPath,outMJPortSumTxtPath,outMJPortFolderPath,MLCShapeFilePath,JLCShapeFilePath,MJLCShapeFilePath): def processMJPort(srcFolderPath,outMJPortSumTxtPath,outMJPortFolderPath,MLCShapeFilePath,JLCShapeFilePath,MJLCShapeFilePath):
@ -107,8 +107,8 @@ def preProcessShipPortTools(srcFolderPath,targetFolderPath,outTargetFolderPath):
MLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\港口(民船).shp" MLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\港口(民船).shp"
JLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军港.shp" # 数据BM不公开 JLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军港.shp" # 数据BM不公开
MJLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军民一体港口.shp" MJLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军民一体港口.shp"
processMJPortflag=2
processMJPortflag=processMJPort(srcFolderPath,outMJPortSumTxtPath,outMJPortFolderPath,MLCShapeFilePath,JLCShapeFilePath,MJLCShapeFilePath) # processMJPortflag=processMJPort(srcFolderPath,outMJPortSumTxtPath,outMJPortFolderPath,MLCShapeFilePath,JLCShapeFilePath,MJLCShapeFilePath)
# 港口归属 # 港口归属
if processMJPortflag==2: if processMJPortflag==2:
# 逐行处理 # 逐行处理
@ -146,8 +146,8 @@ def preProcessShipPortTools(srcFolderPath,targetFolderPath,outTargetFolderPath):
# 处理分块 # 处理分块
for pidx in range(len(async_results)): for pidx in range(len(async_results)):
async_result=async_results[pidx] async_result=async_results[pidx]
print("{}/{} {}".format(pidx+1,len(async_results)),async_result.get()) print("{}/{}".format(pidx+1,len(async_results)))
writeoutlog(logPath,"{}/{} {}".format(pidx+1,len(async_results),async_result.get())) # writeoutlog(logPath,"{}/{}".format(pidx+1,len(async_results),async_result.get()))
pass pass
else: else:
pass pass
@ -184,7 +184,7 @@ if __name__ == '__main__':
# 20250930-不分类 条带模式 # 20250930-不分类 条带模式
srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\0-原图" srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\0-原图"
preFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\A-预处理" preFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\A-预处理2"
targetfolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理" targetfolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理"
preProcessShipPortTools(srcFolderPath, preFolderPath, targetfolderPath) preProcessShipPortTools(srcFolderPath, preFolderPath, targetfolderPath)