From ad6974dfff8c05f06d41a4203c63ee20818bb04d Mon Sep 17 00:00:00 2001 From: tian jiax <446100073@qq.com> Date: Tue, 5 Sep 2023 10:48:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A4=8D=E8=A2=AB=E7=89=A9?= =?UTF-8?q?=E5=80=99=E7=AE=97=E6=B3=95=E7=89=B9=E5=BE=81=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BB=8Exml=E4=B8=AD=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E9=9C=80=E8=A6=81=E7=9A=84=E7=89=B9=E5=BE=81=E7=BB=84?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atmosphericDelay/AtmosphericDelay.xml | 58 ++++++++--------- .../BackScattering/BackScattering.xml | 4 +- tool/algorithm/polsarpro/createfeature.py | 4 +- vegetationPhenology/VegetationPhenology.xml | 25 +++++++- .../VegetationPhenologyMain.py | 62 ++++++++++++++++++- 5 files changed, 115 insertions(+), 38 deletions(-) diff --git a/atmosphericDelay/AtmosphericDelay.xml b/atmosphericDelay/AtmosphericDelay.xml index 94ae4526..a5b2f679 100644 --- a/atmosphericDelay/AtmosphericDelay.xml +++ b/atmosphericDelay/AtmosphericDelay.xml @@ -42,7 +42,7 @@ File zip Man - D:\micro\datas\哨兵山西\slc\S1A_IW_SLC__1SDV_20190113T103754_20190113T103821_025458_02D22C_9158.zip + E:\MicroWorkspace\Micro\哨兵山西\slc\S1A_IW_SLC__1SDV_20190113T103754_20190113T103821_025458_02D22C_9158.zip True False File @@ -57,7 +57,7 @@ File zip Man - D:\micro\datas\哨兵山西\slc\S1A_IW_SLC__1SDV_20190206T103753_20190206T103820_025808_02DED6_28CB.zip + E:\MicroWorkspace\Micro\哨兵山西\slc\S1A_IW_SLC__1SDV_20190206T103753_20190206T103820_025808_02DED6_28CB.zip True False File @@ -74,7 +74,7 @@ File nc Man - D:\micro\datas\哨兵山西\气象数据\1.mars.internal-1658384650.5526075-15219-5-7be4b161-af30-4e9d-a558-f31bfa27880a + E:\MicroWorkspace\Micro\哨兵山西\气象数据\1.mars.internal-1658384650.5526075-15219-5-7be4b161-af30-4e9d-a558-f31bfa27880a True False File @@ -91,7 +91,7 @@ File nc Man - D:\micro\datas\哨兵山西\气象数据\2.mars.internal-1658384693.9301581-22095-6-d9c91225-e15e-41ff-b9b2-e328e6f720cd + E:\MicroWorkspace\Micro\哨兵山西\气象数据\2.mars.internal-1658384693.9301581-22095-6-d9c91225-e15e-41ff-b9b2-e328e6f720cd True False File @@ -106,11 +106,11 @@ File tif Man - D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N38E110_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N38E111_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N39E107_dem.tif; - D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N39E108_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N39E109_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N39E110_dem.tif; - D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N39E111_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N37E107_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N37E108_dem.tif; - D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N37E109_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N37E110_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N37E111_dem.tif; - D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N38E107_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N38E108_dem.tif;D:\micro\datas\哨兵山西\DEM\tifs\ASTGTM2_N38E109_dem.tif + E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N38E110_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N38E111_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N39E107_dem.tif; + E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N39E108_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N39E109_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N39E110_dem.tif; + E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N39E111_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N37E107_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N37E108_dem.tif; + E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N37E109_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N37E110_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N37E111_dem.tif; + E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N38E107_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N38E108_dem.tif;E:\MicroWorkspace\Micro\哨兵山西\DEM\tifs\ASTGTM2_N38E109_dem.tif True False File @@ -125,26 +125,26 @@ File string Cal - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210330T171551_V20190617T225942_20190619T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210330T211516_V20190629T225942_20190701T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T011528_V20190711T225942_20190713T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T051626_V20190723T225942_20190725T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T092024_V20190804T225942_20190806T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T133354_V20190816T225942_20190818T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T173435_V20190828T225942_20190830T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210310T192752_V20190112T225942_20190114T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210310T231958_V20190124T225942_20190126T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T031229_V20190205T225942_20190207T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T070624_V20190217T225942_20190219T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T105526_V20190301T225942_20190303T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T142647_V20190313T225942_20190315T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T181341_V20190325T225942_20190327T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T215910_V20190406T225942_20190408T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T013719_V20190418T225942_20190420T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T052231_V20190430T225942_20190502T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T091107_V20190512T225942_20190514T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T181439_V20190605T225942_20190607T005942.EOF; - D:\micro\datas\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210314T041728_V20190909T225942_20190911T005942.EOF + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210330T171551_V20190617T225942_20190619T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210330T211516_V20190629T225942_20190701T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T011528_V20190711T225942_20190713T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T051626_V20190723T225942_20190725T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T092024_V20190804T225942_20190806T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T133354_V20190816T225942_20190818T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210331T173435_V20190828T225942_20190830T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210310T192752_V20190112T225942_20190114T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210310T231958_V20190124T225942_20190126T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T031229_V20190205T225942_20190207T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T070624_V20190217T225942_20190219T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T105526_V20190301T225942_20190303T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T142647_V20190313T225942_20190315T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T181341_V20190325T225942_20190327T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210311T215910_V20190406T225942_20190408T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T013719_V20190418T225942_20190420T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T052231_V20190430T225942_20190502T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T091107_V20190512T225942_20190514T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210312T181439_V20190605T225942_20190607T005942.EOF; + E:\MicroWorkspace\Micro\哨兵山西\orbits\S1A_OPER_AUX_POEORB_OPOD_20210314T041728_V20190909T225942_20190911T005942.EOF True False diff --git a/backScattering/BackScattering/BackScattering.xml b/backScattering/BackScattering/BackScattering.xml index baf61e89..c392801f 100644 --- a/backScattering/BackScattering/BackScattering.xml +++ b/backScattering/BackScattering/BackScattering.xml @@ -42,7 +42,7 @@ File tar.gz Cal - F:\MicroWorkspace\GF3A_nanjing\GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422.tar.gz + E:\MicroWorkspace\GF3A_nanjing\GF3_SAY_QPSI_011444_E118.9_N31.4_20181012_L1A_AHV_L10003515422.tar.gz True False File @@ -57,7 +57,7 @@ File tif Cal - F:\MicroWorkspace\GF3A_nanjing\dem_n.tif + E:\MicroWorkspace\GF3A_nanjing\dem_n.tif True True File diff --git a/tool/algorithm/polsarpro/createfeature.py b/tool/algorithm/polsarpro/createfeature.py index c001f054..6640d494 100644 --- a/tool/algorithm/polsarpro/createfeature.py +++ b/tool/algorithm/polsarpro/createfeature.py @@ -142,7 +142,7 @@ class CreateFeature: return feature_tif_paths @staticmethod - def decompose_single_tar(hh_hv_vh_vv_list, workspace_processing_path, workspace_preprocessing_path, name, exe_dir, rows, cols, FILTER_SIZE = 3, debug =False ): + def decompose_single_tar(hh_hv_vh_vv_list, workspace_processing_path, workspace_preprocessing_path, name, exe_dir, rows, cols, FILTER_SIZE = 3, debug =False, FeatureInput=['Freeman', 'Yamaguchi', 'Cloude']): hh_hv_vh_vv_dic = {} hh_hv_vh_vv_dic.update({'HH': hh_hv_vh_vv_list[0]}) hh_hv_vh_vv_dic.update({'HV': hh_hv_vh_vv_list[1]}) @@ -156,7 +156,7 @@ class CreateFeature: cfeature.creat_h_a_alpha_features(t3_path, feature_tif_dir) t3_path = cfeature.ahv_to_t3(workspace_processing_path, workspace_preprocessing_path, hh_hv_vh_vv_list, name, FILTER_SIZE) - flag, outFolderDic = cfeature.decompose(workspace_processing_path, name, t3_path, rows, cols, hh_hv_vh_vv_dic, FeatureInput=['Freeman', 'Yamaguchi', 'Cloude']) # , 'Touzi' + flag, outFolderDic = cfeature.decompose(workspace_processing_path, name, t3_path, rows, cols, hh_hv_vh_vv_dic, FeatureInput) # , 'Touzi' cfeature.cereat_features_dic(outFolderDic, feature_tif_dir) return feature_tif_dir diff --git a/vegetationPhenology/VegetationPhenology.xml b/vegetationPhenology/VegetationPhenology.xml index 23ba1e19..489f7070 100644 --- a/vegetationPhenology/VegetationPhenology.xml +++ b/vegetationPhenology/VegetationPhenology.xml @@ -29,7 +29,7 @@ 无需求 - + AHVS 全极化影像集 @@ -63,17 +63,36 @@ box 经纬度包围盒 - 经纬度包围盒SNWE。例子33.7548;33.7687;102.0734;102.0876 new不填写则使用影像相交区域作为包围盒38.171;38.1878;114.36567;114.39168 + 经纬度包围盒SNWE。例子31.527611633687169;31.397153571335469;118.94152;119.02 new不填写则使用影像相交区域作为包围盒38.171;38.1878;114.36567;114.39168 Value string Man - 31.527611633687169;31.397153571335469;118.94152;119.02 + empty DEFAULT DEFAULT DEFAULT DEFAULT DEFAULT + + FeatureCombination + 极化特征组合 + 可选极化特征组合一、共14种特征(编号依次为0-13) + Freeman:表面散射p_s(0)、偶次散射p_d(1)、体散射p_v(2); + Touzi:散射角α_s(3)、散射相位ϕ_α(4)、目标散射对称度τ(5)、相对能量λ_i(6); + Yamaguchi:表面散射f_s(7)、二次散射f_d(8)、体散射f_v(9)、螺旋体散射f_h(10); + Cloude-Pottier:分解散射熵H(11)、反熵A(12)、平均散射角α(13) + Value + string + Man + 0,1,2,7,8,9,10 + True + True + UploadInput + Aux + 0 + Aux + diff --git a/vegetationPhenology/VegetationPhenologyMain.py b/vegetationPhenology/VegetationPhenologyMain.py index c56869b9..e853ca41 100644 --- a/vegetationPhenology/VegetationPhenologyMain.py +++ b/vegetationPhenology/VegetationPhenologyMain.py @@ -55,6 +55,12 @@ class PhenologyMain: self.processinfo = [1, 1, 1, 1] self._name_tr_dic = {} #l1a转换geo的对象 + self.__FeatureMap = {} + # 特征索引对应的文件名 + self.___FeatureFileNameMap = {} + # 初始化特征参数 + self.__FeatureParaInit() + def check_source(self): """ 检查算法相关的配置文件,图像,辅助文件是否齐全 @@ -68,8 +74,11 @@ class PhenologyMain: # 检查景影像是否为全极化 self.__input_paras = self.__alg_xml_handler.get_input_paras() - if self.__check_handler.check_input_paras(self.__input_paras) is False: + checkFlag, self.__parameters_dic = self.__check_handler.check_input_paras(self.__input_paras) + if checkFlag is False: return False + # if self.__check_handler.check_input_paras(self.__input_paras) is False: + # return False self.__workspace_path = self.__alg_xml_handler.get_workspace_path() self.__create_work_space() @@ -161,6 +170,54 @@ class PhenologyMain: rows = self.imageHandler.get_img_height(self.__preprocessed_paras[key]) return rows, cols + def __getInputFeatures(self): + """ + 获取输入特征组合 + 1.Freeman:表面散射p_s、偶次散射p_d、体散射p_v 对应序号:[0,1,2] + 2.Touzi:散射角α_s、散射相位ϕ_α、目标散射对称度τ、相对能量λ_i 对应序号:[3,4,5,6] + 3.Yamaguchi:表面散射f_s、二次散射f_d、体散射f_v、螺旋体散射f_h 对应序号:[7,8,9,10] + 4.Cloude - Pottier:分解散射熵H、反熵A、平均散射角α 对应序号:[11,12,13] + """ + decomposeList = self.__parameters_dic["FeatureCombination"].split(',') + stepSet = set() + featureInput = set() + for item in decomposeList: + stepSet.add(int(item)) + + for i in stepSet: + if 0 <= i < 3: + featureInput.add('Freeman') + elif 3 <= i < 7: + featureInput.add('Touzi') + elif 7 <= i < 11: + featureInput.add('Yamaguchi') + elif 11 <= i < 14: + featureInput.add('Cloude') + else: + logger.warning("__decomposeSteps Invalid data:%s!", i) + + return featureInput + + def __FeatureParaInit(self): + self.__FeatureMap["Freeman"] = [0, 1, 2] + self.__FeatureMap["Touzi"] = [3, 4, 5, 6] + self.__FeatureMap["Yamaguchi"] = [7, 8, 9, 10] + self.__FeatureMap["Cloude"] = [11, 12, 13] + + self.___FeatureFileNameMap[0] = ['Freeman', "Freeman_Odd.bin"] + self.___FeatureFileNameMap[1] = ['Freeman', "Freeman_Dbl.bin"] + self.___FeatureFileNameMap[2] = ['Freeman', "Freeman_Vol.bin"] + self.___FeatureFileNameMap[3] = ['Touzi', "alpha.bin"] + self.___FeatureFileNameMap[4] = ['Touzi', "phi.bin"] + self.___FeatureFileNameMap[5] = ['Touzi', "tau.bin"] + self.___FeatureFileNameMap[6] = ['Touzi', "psi.bin"] + self.___FeatureFileNameMap[7] = ['Yamaguchi', "Yamaguchi4_Odd.bin"] + self.___FeatureFileNameMap[8] = ['Yamaguchi', "Yamaguchi4_Dbl.bin"] + self.___FeatureFileNameMap[9] = ['Yamaguchi', "Yamaguchi4_Vol.bin"] + self.___FeatureFileNameMap[10] = ['Yamaguchi', "Yamaguchi4_Hlx.bin"] + self.___FeatureFileNameMap[11] = ['Cloude', "anisotropy.bin"] + self.___FeatureFileNameMap[12] = ['Cloude', "entropy.bin"] + self.___FeatureFileNameMap[13] = ['Cloude', "alpha.bin"] def create_feature_single_tar(self, name): key_list = [key for key in self.__preprocessed_paras.keys() if((name in key) and ('inc_angle' not in key) and ('LocalIncidenceAngle' not in key))] @@ -186,7 +243,8 @@ class PhenologyMain: cols = self.imageHandler.get_img_width(hh_hv_vh_vv_list[0]) rows = self.imageHandler.get_img_height(hh_hv_vh_vv_list[0]) - feature_dir = CreateFeature.decompose_single_tar(hh_hv_vh_vv_list, self.__workspace_processing_path, self.__workspace_preprocessing_path, name,self._env_str, rows, cols, FILTER_SIZE=3, debug=DEBUG) + featureInput = self.__getInputFeatures() + feature_dir = CreateFeature.decompose_single_tar(hh_hv_vh_vv_list, self.__workspace_processing_path, self.__workspace_preprocessing_path, name, self._env_str, rows, cols, FILTER_SIZE=3, debug=DEBUG, FeatureInput=featureInput) # 获取训练集提取特征的信息 ids = []