From f9d5391f4757bf86312e6374ad338f68e020bbfc Mon Sep 17 00:00:00 2001 From: tian jiax <446100073@qq.com> Date: Fri, 14 Feb 2025 15:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BE=AE=E6=B3=A2=E7=BB=88?= =?UTF-8?q?=E9=AA=8C=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ortho/OrthoMain.py | 3 ++- Ortho/Ortho_C_SAR_V3.xml | 14 ++++++------- backScattering/BackScatteringAlg.py | 4 ++-- backScattering/BackScatteringMain.py | 20 +++++++++---------- deformation-C-SAR/Deformation_C_SAR_V3.xml | 4 ++-- dem-C-SAR/Dem_C_SAR_V3.xml | 4 ++-- dem-C-SAR/geocoding.py | 2 +- landcover_c_sar/LandCover_C_SAR_V3.xml | 7 ++----- leafAreaIndex/LeafIndexMain.spec | 23 ++++++++++++++++++++++ 9 files changed, 51 insertions(+), 30 deletions(-) diff --git a/Ortho/OrthoMain.py b/Ortho/OrthoMain.py index 28a997c9..f4bbd402 100644 --- a/Ortho/OrthoMain.py +++ b/Ortho/OrthoMain.py @@ -320,7 +320,6 @@ class OrthoMain: BlockProcess.unzip_dem(file_path, dem_path) # tif_name = os.path.basename(file_path) # shutil.copy(file_path, os.path.join(dem_path, tif_name)) - para_path = os.path.join(self.__workspace_origin_path,para['ParaName']) processing_paras.update({name: dem_path}) elif para['ParaType'] == 'Value': if para['DataType'] == 'float': @@ -1008,3 +1007,5 @@ if __name__ == '__main__': end = datetime.datetime.now() logger.info('running use time: %s ' % (end - start)) + + diff --git a/Ortho/Ortho_C_SAR_V3.xml b/Ortho/Ortho_C_SAR_V3.xml index d4e03a55..198e7543 100644 --- a/Ortho/Ortho_C_SAR_V3.xml +++ b/Ortho/Ortho_C_SAR_V3.xml @@ -49,7 +49,7 @@ DEFAULT DEFAULT - F:\MicroWorkspace\20240826Ortho\GF3B_MH1_UFS_012705_E116.4_N44.2_20240422_L1A_DH_L10000343416.tar.gz + D:\micro\test\slcData\GF3B_MYC_QPSI_008114_E121.6_N40.9_20230608_L1A_AHV_L10000196489.tar.gz True False File @@ -62,12 +62,12 @@ DEM数字高程影像 30m分辨率DEM数字高程影像tif File - File + zip DEFAULT DEFAULT DEFAULT Cal - F:\MicroWorkspace\20240826Ortho\dem + D:\micro\test\auxData\115E39N_COP30.zip;D:\micro\test\auxData\121E39N_COP30.zip True True File @@ -80,13 +80,13 @@ 哨兵底图数据 同地区哨兵地图用于影像配准 File - File + zip Cal DEFAULT DEFAULT DEFAULT - F:\MicroWorkspace\20240826Ortho\S1GBM + D:\micro\test\auxData\B0104_AS010M_E066N044T1_S1GBM.zip;D:\micro\test\auxData\B0104_AS010M_E066N045T1_S1GBM.zip True False File @@ -99,7 +99,7 @@ 选择校正方法 2.RD int - int + float DEFAULT DEFAULT DEFAULT @@ -121,7 +121,7 @@ File tar.gz Cal - D:\micro\WorkSpace\ortho\Output\GF3B_MH1_UFS_012705_E116.4_N44.2_20240422_L1A_DH_L10000343416-ortho.tar.gz + D:\micro\WorkSpace\ortho\Output\GF3B_MYC_QPSI_008114_E121.6_N40.9_20230608_L1A_AHV_L10000196489-ortho.tar.gz DEFAULT DEFAULT DEFAULT diff --git a/backScattering/BackScatteringAlg.py b/backScattering/BackScatteringAlg.py index 1f61f254..eca7b8de 100644 --- a/backScattering/BackScatteringAlg.py +++ b/backScattering/BackScatteringAlg.py @@ -1032,9 +1032,9 @@ class DEMProcess(object): del in_ds, out_band, out_ds @staticmethod - def unzip_file(zip_file_path, out_path): + def unzip_file(zip_file_path, out_path, dirName): # 获取压缩文件所在的目录 - out_path_merg = os.path.join(out_path, 'dem') + out_path_merg = os.path.join(out_path, dirName) os.mkdir(out_path_merg) para_value_list = zip_file_path.split(";") diff --git a/backScattering/BackScatteringMain.py b/backScattering/BackScatteringMain.py index 67d2e341..b0cbd804 100644 --- a/backScattering/BackScatteringMain.py +++ b/backScattering/BackScatteringMain.py @@ -127,15 +127,14 @@ class ScatteringMain: processing_paras.update(tar_gz_dic) elif para['DataType'] == 'zip': # temp_para = para['ParaValue'].split(".")[0] - para_value_list = para['ParaValue'].split(";") - if len(para_value_list) == 1: - para_path = para['ParaValue'] - if para_path != 'empty' and para_path != '': - file_path = BlockProcess.unzip_file(para_path, out_path) - processing_paras.update({name: os.path.dirname(file_path)}) - else: - file_path = DEMProcess.unzip_file(para['ParaValue'], out_path) - processing_paras.update({name: file_path}) + para_path_list = para['ParaValue'].split(";") + if len(para_path_list) != 0: + dem_path = os.path.join(self.__workspace_origin_path, para['ParaName']) + if os.path.exists(dem_path) is False: + os.mkdir(dem_path) + for file_path in para_path_list: + BlockProcess.unzip_dem(file_path, dem_path) + processing_paras.update({name: dem_path}) elif para['DataType'] == 'tif' or para['DataType'] == 'tiff': # 新增修改dem数据为文件绝对路径 if para['ParaValue'] != 'empty' and para['ParaValue'] != 'Empty' and para['ParaValue'] != '': para_path_list = para['ParaValue'].split(";") @@ -579,7 +578,8 @@ if __name__ == '__main__': start = datetime.datetime.now() try: if len(sys.argv) < 2: - xml_path = 'BackScattering_C_SAR_V3.xml' + # xml_path = 'BackScattering_C_SAR_V3.xml' + xml_path = 'CAL.xml' else: xml_path = sys.argv[1] ScatteringMain = ScatteringMain(xml_path) diff --git a/deformation-C-SAR/Deformation_C_SAR_V3.xml b/deformation-C-SAR/Deformation_C_SAR_V3.xml index e947e526..a4ee6c75 100644 --- a/deformation-C-SAR/Deformation_C_SAR_V3.xml +++ b/deformation-C-SAR/Deformation_C_SAR_V3.xml @@ -36,7 +36,7 @@ 主影像时间 CSAR 主影像成像时间 Value - string + float DEFAULT DEFAULT DEFAULT @@ -111,7 +111,7 @@ 'Coherence threshold for estimating azimuth misregistration using enhanced spectral diversity Value - string + float DEFAULT DEFAULT DEFAULT diff --git a/dem-C-SAR/Dem_C_SAR_V3.xml b/dem-C-SAR/Dem_C_SAR_V3.xml index 420e583d..9a22ef55 100644 --- a/dem-C-SAR/Dem_C_SAR_V3.xml +++ b/dem-C-SAR/Dem_C_SAR_V3.xml @@ -36,7 +36,7 @@ 主影像时间 CSAR 主影像成像时间 Value - string + float DEFAULT DEFAULT DEFAULT @@ -111,7 +111,7 @@ 'Coherence threshold for estimating azimuth misregistration using enhanced spectral diversity Value - string + float DEFAULT DEFAULT DEFAULT diff --git a/dem-C-SAR/geocoding.py b/dem-C-SAR/geocoding.py index 0b42bf61..26fa66e6 100644 --- a/dem-C-SAR/geocoding.py +++ b/dem-C-SAR/geocoding.py @@ -133,7 +133,7 @@ def geoCoding(tree,X_min,X_max,Y_min,Y_max,block_size,value_data,target_arr): X_ids=XY_query[idx,0] # x Y_ids=XY_query[idx,1] # y XY_query=np.concatenate([X_ids.reshape(-1,1),Y_ids.reshape(-1,1)],axis=1) - dist_mask=dist[:,3]<=1 #################################################################################### + dist_mask=dist[:,3]<=10 #################################################################################### idx=np.where(dist_mask==1) ind=ind[idx,:][0,:,:] dist=dist[idx,:][0,:,:] diff --git a/landcover_c_sar/LandCover_C_SAR_V3.xml b/landcover_c_sar/LandCover_C_SAR_V3.xml index 7e48f862..86256dbf 100644 --- a/landcover_c_sar/LandCover_C_SAR_V3.xml +++ b/landcover_c_sar/LandCover_C_SAR_V3.xml @@ -34,7 +34,7 @@ AHV CSAR全极化slc影像 - CSAR 全极化slc影像 + CSAR全极化slc影像 File tar.gz DEFAULT @@ -89,10 +89,7 @@ FeatureCombination 极化特征组合 - 可选极化特征组合一、共14种特征(编号依次为0-13) - Freeman:表面散射p_s(0)、偶次散射p_d(1)、体散射p_v(2); - Yamaguchi:表面散射f_s(3)、二次散射f_d(4)、体散射f_v(5)、螺旋体散射f_h(6); - Cloude-Pottier:分解散射熵H(7)、反熵A(8)、平均散射角α(9) + 可选极化特征组合一、共14种特征 Value string DEFAULT diff --git a/leafAreaIndex/LeafIndexMain.spec b/leafAreaIndex/LeafIndexMain.spec index fbb34dc1..fdb64db6 100644 --- a/leafAreaIndex/LeafIndexMain.spec +++ b/leafAreaIndex/LeafIndexMain.spec @@ -1,6 +1,29 @@ # -*- mode: python ; coding: utf-8 -*- +import sys +from shutil import copy +import os +cwdpath = os.getcwd() +toolDir = os.path.join(cwdpath, 'tool') +if os.path.exists(toolDir): + os.remove(toolDir) +os.mkdir(toolDir) +source_folder = '../tool' + +def copy_file(path_read, path_write): + names = os.listdir(path_read) + for name in names: + path_read_new = os.path.join(path_read, name) + path_write_new = os.path.join(path_write, name) + if os.path.isdir(path_read_new): + if not os.path.exists(path_write_new): + os.mkdir(path_write_new) + copy_file(path_read_new, path_write_new) + else: + copy(path_read_new, path_write_new) + +copy_file(source_folder, toolDir) block_cipher = None