From d63423ff185637270480d938d4872d648ad09f1d Mon Sep 17 00:00:00 2001 From: chenzenghui <3045316072@qq.com> Date: Fri, 3 Oct 2025 13:37:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=B8=AF=E5=8F=A3=E5=88=87?= =?UTF-8?q?=E7=89=87=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PredictProcessRaster.py | 28 ++--- SpitShipLabelTools/SpliteShipPort_AB.py | 2 +- StaticLabelResult.py | 2 +- gen_annex3.py | 22 ++-- .../PredictProcessRasterMJLCPort_AC.py | 6 +- .../PredictProcessRaster_AC.py | 22 ++-- .../SpacetyTIFFDataStretch2PNG_AC.py | 111 ++++++++++++------ .../SplitShipPortRasterTools_AC.py | 8 +- tools/SpliteShipPort_AA.py | 6 +- 9 files changed, 126 insertions(+), 81 deletions(-) diff --git a/PredictProcessRaster.py b/PredictProcessRaster.py index 4fda2d5..f11837f 100644 --- a/PredictProcessRaster.py +++ b/PredictProcessRaster.py @@ -118,14 +118,14 @@ def processPool(srcFolderPath,preFolderPath,targetfolderPath,logPath=r"R:\TYSAR- print("{}/{}".format(pidx+1,len(async_results)),async_result.get()) writeoutlog(logPath,"{}/{} {}".format(pidx+1,len(async_results),async_result.get())) writeoutlog(logPath, "\nprocess finished \n") - moverTip,moveflag=moveDir(preFolderPath, targetfolderPath) - writeoutlog(logPath, moverTip) + # moverTip,moveflag=moveDir(preFolderPath, targetfolderPath) + # writeoutlog(logPath, moverTip) writeoutlog(logPath, "====================================================================================\n") - if moveflag: - pass - else: - exit(3) + # if moveflag: + # pass + # else: + # exit(3) ######################################################## # 流程执行区 @@ -146,16 +146,16 @@ if __name__ == '__main__': # processPool(srcFolderPath, preFolderPath,targetfolderPath, logPath) # # 20250826-不分类 条带模式 - srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\0-原图" - preFolderPath = r"D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理\AB-图像预处理" + srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\0-原图" + preFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\A-预处理\AB-图像预处理" targetfolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理\AB-图像预处理" processPool(srcFolderPath, preFolderPath, targetfolderPath,logPath) - # 20250903-不分类 条带模式 - srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\0-原图" - preFolderPath = r"D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\A-预处理\AB-图像预处理" - targetfolderPath = r"D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\A-预处理\AB-图像预处理" - processPool(srcFolderPath, preFolderPath,targetfolderPath, logPath) + # # 20250903-不分类 条带模式 + # srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\0-原图" + # preFolderPath = r"D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\A-预处理\AB-图像预处理" + # targetfolderPath = r"D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\A-预处理\AB-图像预处理" + # processPool(srcFolderPath, preFolderPath,targetfolderPath, logPath) # # 20250910-不分类 条带模式 # srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250910-不分类\0-原图" @@ -164,7 +164,7 @@ if __name__ == '__main__': # processPool(srcFolderPath, preFolderPath, targetfolderPath,logPath) - result_flag_txt = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\strechResult_finish.log" + result_flag_txt = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\strechResult_finish.log" with open(result_flag_txt,"w",encoding="utf-8") as f: f.write("strech finied!!!\n") writeoutlog(logPath, "strech finied!!!\n") diff --git a/SpitShipLabelTools/SpliteShipPort_AB.py b/SpitShipLabelTools/SpliteShipPort_AB.py index 545afc3..4e91ae8 100644 --- a/SpitShipLabelTools/SpliteShipPort_AB.py +++ b/SpitShipLabelTools/SpliteShipPort_AB.py @@ -67,7 +67,7 @@ def SpliteProcess(srcfolderpath,infolderpath,outfolderpath): labeltxtPaths=find_label_files_pathlib(infolderpath) - JportLabel=os.path.join(outfolderpath,'君港') + JportLabel=os.path.join(outfolderpath,'军港') MportLabel=os.path.join(outfolderpath,'民港') MJportLabel=os.path.join(outfolderpath,'混合港') NoportLabel=os.path.join(outfolderpath,'无港口') diff --git a/StaticLabelResult.py b/StaticLabelResult.py index 3115ab8..6d48dfd 100644 --- a/StaticLabelResult.py +++ b/StaticLabelResult.py @@ -36,7 +36,7 @@ def statictNumber(inlabelfilepath): def StaticProcess(inlabelfolder,outcsvpath): labelfilepaths=find_txt_files_pathlib(inlabelfolder) with open(outcsvpath,"w",encoding="utf-8") as f: - f.write("切片名,君用飞机,民用飞机,君民一体飞机,君用轮船,民用轮船,民用机场,君用机场,君民一体机场,君用港口,民用港口,君民一体港口,总计\n") + f.write("切片名,军用飞机,民用飞机,军民一体飞机,军用轮船,民用轮船,民用机场,军用机场,军民一体机场,军用港口,民用港口,军民一体港口,总计\n") f.write("标注,military_airplane, civil_airplane,mix_airpllane,military_ship,civil_ship,civil_airport,military_airport,mix_airport,military_harbor,civil_harbor,mix_harbor,Total\n") for labelfilepath in labelfilepaths: diff --git a/gen_annex3.py b/gen_annex3.py index b10c755..6979db1 100644 --- a/gen_annex3.py +++ b/gen_annex3.py @@ -8,10 +8,10 @@ import argparse def stats_ship_labels(input_dir, output_file, person="", work_time=""): header = [ "标签", "负责人", "作业时间", - "君用飞机", "民用飞机", "君民一体飞机", - "君用轮船", "民用轮船", - "民用机场", "君用机场", "君民一体机场", - "民用港口", "君用港口", "君民一体港口", + "军用飞机", "民用飞机", "军民一体飞机", + "军用轮船", "民用轮船", + "民用机场", "军用机场", "军民一体机场", + "民用港口", "军用港口", "军民一体港口", "总计" ] alias = [ @@ -50,16 +50,16 @@ def stats_ship_labels(input_dir, output_file, person="", work_time=""): # "负责人":person, # "作业时间":work_time, # "民用飞机":0, - # "君用飞机":0, - # "君民一体飞机":0, - # "君用轮船":0, + # "军用飞机":0, + # "军民一体飞机":0, + # "军用轮船":0, # "民用轮船":counts["民用轮船"], # "民用机场":0, - # "君用机场":0, - # "君民一体机场":0, - # "君用港口":0, + # "军用机场":0, + # "军民一体机场":0, + # "军用港口":0, # "民用港口":0, - # "君民一体港口":0 + # "军民一体港口":0 # } # row["总计"] = row["民用轮船"] # rows.append(row) diff --git a/generatorRasterSlicesTools/PredictProcessRasterMJLCPort_AC.py b/generatorRasterSlicesTools/PredictProcessRasterMJLCPort_AC.py index 25c3f7d..449bd6c 100644 --- a/generatorRasterSlicesTools/PredictProcessRasterMJLCPort_AC.py +++ b/generatorRasterSlicesTools/PredictProcessRasterMJLCPort_AC.py @@ -90,7 +90,7 @@ def preProcessShipPortTools(srcFolderPath,targetFolderPath,outTargetFolderPath): # # # 文件接口创建 # MPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","民港口") - # JPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","君港口") + # JPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","军港口") # MJPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","混合港口") # NoPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","无港口") # @@ -105,8 +105,8 @@ def preProcessShipPortTools(srcFolderPath,targetFolderPath,outTargetFolderPath): existOrCreate(outMJPortFolderPath) MLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\港口(民船).shp" - JLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君港.shp" - MJLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君民一体港口.shp" + JLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军港.shp" + MJLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军民一体港口.shp" processMJPortflag=processMJPort(srcFolderPath,outMJPortSumTxtPath,outMJPortFolderPath,MLCShapeFilePath,JLCShapeFilePath,MJLCShapeFilePath) diff --git a/generatorRasterSlicesTools/PredictProcessRaster_AC.py b/generatorRasterSlicesTools/PredictProcessRaster_AC.py index cd9be25..7f364fd 100644 --- a/generatorRasterSlicesTools/PredictProcessRaster_AC.py +++ b/generatorRasterSlicesTools/PredictProcessRaster_AC.py @@ -90,7 +90,7 @@ def preProcessShipPortTools(srcFolderPath,targetFolderPath,outTargetFolderPath): # 文件接口创建 MPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","民港口") - JPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","君港口") + JPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","军港口") MJPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","混合港口") NoPortFolder=os.path.join(targetFolderPath,"AC-图像预处理","无港口") @@ -105,8 +105,8 @@ def preProcessShipPortTools(srcFolderPath,targetFolderPath,outTargetFolderPath): existOrCreate(outMJPortFolderPath) MLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\港口(民船).shp" - JLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君港.shp" # 数据BM,不公开 - MJLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君民一体港口.shp" + JLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军港.shp" # 数据BM,不公开 + MJLCShapeFilePath=r"D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军民一体港口.shp" processMJPortflag=processMJPort(srcFolderPath,outMJPortSumTxtPath,outMJPortFolderPath,MLCShapeFilePath,JLCShapeFilePath,MJLCShapeFilePath) # 港口归属 @@ -140,13 +140,13 @@ def preProcessShipPortTools(srcFolderPath,targetFolderPath,outTargetFolderPath): tarPortFolder=NoPortFolder else: continue - # async_results.append(preProcessTiFF(tiffpath,portTxtpath,tarPortFolder)) + async_results.append(preProcessTiFF(tiffpath,portTxtpath,tarPortFolder)) else: continue # 处理分块 for pidx in range(len(async_results)): async_result=async_results[pidx] - print("{}/{}".format(pidx+1,len(async_results)),async_result.get()) + print("{}/{} {}".format(pidx+1,len(async_results)),async_result.get()) writeoutlog(logPath,"{}/{} {}".format(pidx+1,len(async_results),async_result.get())) pass else: @@ -177,8 +177,14 @@ if __name__ == '__main__': # preProcessShipPortTools(srcFolderPath, preFolderPath,targetfolderPath, logPath) # # 20250826-不分类 条带模式 - srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\0-原图" - preFolderPath = r"D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理" + # srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\0-原图" + # preFolderPath = r"D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理" + # targetfolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理" + # preProcessShipPortTools(srcFolderPath, preFolderPath, targetfolderPath) + + # 20250930-不分类 条带模式 + srcFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\0-原图" + preFolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\航道\20250930-不分类\A-预处理" targetfolderPath = r"R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250826-不分类\A-预处理" preProcessShipPortTools(srcFolderPath, preFolderPath, targetfolderPath) @@ -189,5 +195,3 @@ if __name__ == '__main__': - - diff --git a/generatorRasterSlicesTools/SpacetyTIFFDataStretch2PNG_AC.py b/generatorRasterSlicesTools/SpacetyTIFFDataStretch2PNG_AC.py index 16d6ced..a4aee02 100644 --- a/generatorRasterSlicesTools/SpacetyTIFFDataStretch2PNG_AC.py +++ b/generatorRasterSlicesTools/SpacetyTIFFDataStretch2PNG_AC.py @@ -311,20 +311,22 @@ def slicePortDataset(rootname,im_data,src_im_data, im_Geotrans, im_proj, outfold MLCPoints=[] JLCPoints=[] MJLCPoints=[] + portfilelines=[] with open(portfilestr,"r",encoding="utf-8") as portfile: - for line in portfile.readlines(): - if(len(line)>3): - linemetas=line.split("\t\t") - clsname=linemetas[0] - pointstr=linemetas[1] - pointx=float(pointstr.split(",")[0]) - pointy=float(pointstr.split(",")[1]) - if clsname=="JLC": - JLCPoints.append([pointx,pointy]) - elif clsname=="MJLC": - MJLCPoints.append([pointx,pointy]) - elif clsname=="MLC": - MLCPoints.append([pointx,pointy]) + portfilelines=portfile.readlines() + for line in portfilelines: + if(len(line)>3): + linemetas=line.split("\t\t") + clsname=linemetas[0] + pointstr=linemetas[1] + pointx=float(pointstr.split(",")[0]) # PX + pointy=float(pointstr.split(",")[1]) # Py + if clsname=="JLC": + JLCPoints.append([pointx,pointy]) + elif clsname=="MJLC": + MJLCPoints.append([pointx,pointy]) + elif clsname=="MLC": + MLCPoints.append([pointx,pointy]) # 处理文件脚本 if len(MLCPoints)==0 and len(JLCPoints)==0 and len(MJLCPoints)==0: return @@ -334,27 +336,66 @@ def slicePortDataset(rootname,im_data,src_im_data, im_Geotrans, im_proj, outfold binfolder=os.path.join(outfolder,"港口","unit8binfolder") pngfolder=os.path.join(outfolder,"港口","pngfolder") tifffolder=os.path.join(outfolder,"港口","tifffolder") - h,w=im_data.shape - nextH,ht=getNextSliceNumber(h,portsliceSize,BlockOverLayer) - nextW,wt=getNextSliceNumber(w,portsliceSize,BlockOverLayer) - padH=nextH-h - padW=nextW-w - im_data=np.pad(im_data,((0,padH),(0,padW)),mode='constant',constant_values=0) - src_im_data=np.pad(src_im_data,((0,padH),(0,padW)),mode='constant',constant_values=0) - for hi in ht: - for wi in wt: - geotrans_temp=getsliceGeotrans(im_Geotrans,wi,hi) - im_data_temp=im_data[hi:hi+portsliceSize,wi:wi+portsliceSize] - src_im_data_temp=src_im_data[hi:hi+portsliceSize,wi:wi+portsliceSize] - slice_ID = slice_ID + 1 - if ishasPort(geotrans_temp,src_im_data_temp,MLCPoints,JLCPoints,MJLCPoints): - sliceBinPath=os.path.join(binfolder, rootname+"_"+str(slice_ID).zfill(4)+"_image.tiff") - slicepngPath=os.path.join(pngfolder, rootname+"_"+str(slice_ID).zfill(4)+"_image.png") - slicesrctiffPath=os.path.join(tifffolder, rootname+"_"+str(slice_ID).zfill(4)+"_image.tiff") - write_tiff(src_im_data_temp, geotrans_temp, im_proj, slicesrctiffPath) - write_envi(im_data_temp,geotrans_temp,im_proj,sliceBinPath) - Image.fromarray(im_data_temp).save(slicepngPath,compress_level=0) + for P in JLCPoints: + Px=P[0] + Py=P[1] + Sx=P[0]-portsliceSize/2 + Sy=P[1]-portsliceSize/2 + wi=Sx if Sx>0 else 0 + hi=Sy if Sy>0 else 0 + slice_ID = slice_ID + 1 + im_data_temp = im_data[hi:hi + portsliceSize, wi:wi + portsliceSize] + src_im_data_temp = src_im_data[hi:hi + portsliceSize, wi:wi + portsliceSize] + + sliceBinPath = os.path.join(binfolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.tiff") + slicepngPath = os.path.join(pngfolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.png") + slicesrctiffPath = os.path.join(tifffolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.tiff") + + geotrans_temp = getsliceGeotrans(im_Geotrans, wi, hi) + write_tiff(src_im_data_temp, geotrans_temp, im_proj, slicesrctiffPath) + write_envi(im_data_temp, geotrans_temp, im_proj, sliceBinPath) + Image.fromarray(im_data_temp).save(slicepngPath, compress_level=4) + + for P in MJLCPoints: + Px = P[0] + Py = P[1] + Sx = P[0] - portsliceSize / 2 + Sy = P[1] - portsliceSize / 2 + wi = Sx if Sx > 0 else 0 + hi = Sy if Sy > 0 else 0 + slice_ID = slice_ID + 1 + im_data_temp = im_data[hi:hi + portsliceSize, wi:wi + portsliceSize] + src_im_data_temp = src_im_data[hi:hi + portsliceSize, wi:wi + portsliceSize] + + sliceBinPath = os.path.join(binfolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.tiff") + slicepngPath = os.path.join(pngfolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.png") + slicesrctiffPath = os.path.join(tifffolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.tiff") + + geotrans_temp = getsliceGeotrans(im_Geotrans, wi, hi) + write_tiff(src_im_data_temp, geotrans_temp, im_proj, slicesrctiffPath) + write_envi(im_data_temp, geotrans_temp, im_proj, sliceBinPath) + Image.fromarray(im_data_temp).save(slicepngPath, compress_level=4) + + for P in MLCPoints: + Px = P[0] + Py = P[1] + Sx = P[0] - portsliceSize / 2 + Sy = P[1] - portsliceSize / 2 + wi = Sx if Sx > 0 else 0 + hi = Sy if Sy > 0 else 0 + slice_ID = slice_ID + 1 + im_data_temp = im_data[hi:hi + portsliceSize, wi:wi + portsliceSize] + src_im_data_temp = src_im_data[hi:hi + portsliceSize, wi:wi + portsliceSize] + + sliceBinPath = os.path.join(binfolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.tiff") + slicepngPath = os.path.join(pngfolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.png") + slicesrctiffPath = os.path.join(tifffolder, rootname + "_" + str(slice_ID).zfill(4) + "_image.tiff") + + geotrans_temp = getsliceGeotrans(im_Geotrans, wi, hi) + write_tiff(src_im_data_temp, geotrans_temp, im_proj, slicesrctiffPath) + write_envi(im_data_temp, geotrans_temp, im_proj, sliceBinPath) + Image.fromarray(im_data_temp).save(slicepngPath, compress_level=4) print("图像切片结束") return slice_ID @@ -439,8 +480,8 @@ def stretchSliceProcess(infilepath, outfolder,portfilestr, strechmethod): slice_ID=0 slice_ID=sliceShipDataset(rootname,im_data, src_im_data,im_Geotrans, im_proj, outfolder) # 舰船切片 slice_ID=slice_ID+1 - # slice_ID=slicePortDataset(rootname,im_data, src_im_data,im_Geotrans, im_proj, outfolder,slice_ID,portfilestr) - slice_ID=sliceLabelPortDataset(rootname,im_data, src_im_data,im_Geotrans, im_proj, outfolder,slice_ID,portfilestr) # 港口拉伸 + slice_ID=slicePortDataset(rootname,im_data, src_im_data,im_Geotrans, im_proj, outfolder,slice_ID,portfilestr) + # slice_ID=sliceLabelPortDataset(rootname,im_data, src_im_data,im_Geotrans, im_proj, outfolder,slice_ID,portfilestr) # 港口拉伸 print("图像切片与拉伸完成") pass diff --git a/generatorRasterSlicesTools/SplitShipPortRasterTools_AC.py b/generatorRasterSlicesTools/SplitShipPortRasterTools_AC.py index 3968887..0541e93 100644 --- a/generatorRasterSlicesTools/SplitShipPortRasterTools_AC.py +++ b/generatorRasterSlicesTools/SplitShipPortRasterTools_AC.py @@ -12,10 +12,10 @@ from pathlib import Path import shutil """ -1. 港口,5000x5000,君港与民港切片, +1. 港口,5000x5000,军港与民港切片, a. 预标注框给他们 b. 重叠率25%重复 - c. 君民2000m 以内,影像抽出来 + c. 军民2000m 以内,影像抽出来 d. 原影像如果只有 1 个港口,-》 港口类型 多 个港口,-》 远近,如果港口距离1000m ,单独拉出来 @@ -269,8 +269,8 @@ def getParams(): parser.add_argument('-o', '--outfilepath',type=str,default=r'D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\A-预处理\JMPort.txt', help='输出geojson文件') parser.add_argument('-f', '--folderOutpath',type=str,help=r'PortfolderOutpath', default=r'D:\TYSAR-德清院\TYSAR-条带模式(SM)\港口\20250903-不分类\A-预处理\PortPoints') parser.add_argument('-m', '--mLC',type=str,help=r'MLC', default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\港口(民船).shp') - parser.add_argument('-j', '--jLC',type=str,help=r'JLC' ,default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君港.shp') - parser.add_argument('-jm', '--jmlc',type=str,help=r'JMLC', default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君民一体港口.shp') + parser.add_argument('-j', '--jLC',type=str,help=r'JLC' ,default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军港.shp') + parser.add_argument('-jm', '--jmlc',type=str,help=r'JMLC', default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军民一体港口.shp') args = parser.parse_args() return args diff --git a/tools/SpliteShipPort_AA.py b/tools/SpliteShipPort_AA.py index 068899c..13530a8 100644 --- a/tools/SpliteShipPort_AA.py +++ b/tools/SpliteShipPort_AA.py @@ -247,10 +247,10 @@ def getParams(): parser = argparse.ArgumentParser() parser.add_argument('-s','--srcfolder',type=str,default=r'R:\TYSAR-德清院\TYSAR-条带模式(SM)\港口', help='输入shapefile文件') parser.add_argument('-i','--intiffolder',type=str,default=r'D:\TYSAR-德清院\切片结果整理', help='输入shapefile文件') - parser.add_argument('-o', '--outfolder',type=str,default=r'D:\TYSAR-德清院\君民区分结果', help='输出geojson文件') + parser.add_argument('-o', '--outfolder',type=str,default=r'D:\TYSAR-德清院\军民区分结果', help='输出geojson文件') parser.add_argument('-m', '--mLC',type=str,help=r'MLC', default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\港口(民船).shp') - parser.add_argument('-j', '--jLC',type=str,help=r'JLC' ,default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君港.shp') - parser.add_argument('-jm', '--jmLC',type=str,help=r'MJLC', default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\君民一体港口.shp') + parser.add_argument('-j', '--jLC',type=str,help=r'JLC' ,default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军港.shp') + parser.add_argument('-jm', '--jmLC',type=str,help=r'MJLC', default=r'D:\TYSAR-德清院\目标点位信息更新\0828目标点位\军民一体港口.shp') args = parser.parse_args() return args