上传盐碱度拆分L-sar代码

dev
tian jiax 2024-03-14 10:24:24 +08:00
parent 117fae8126
commit 0f6e8ff8f8
467 changed files with 7136 additions and 0 deletions

View File

@ -0,0 +1,16 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\atmosphericDelay-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
ERROR:mylog:run-time error!
Traceback (most recent call last):
File "D:/estar-proj/microproduct-l-sar/atmosphericDelay-L-SAR/AtmosphericDelayMain.py", line 1250, in <module>
if AtmosphericMain.check_source() is False:
File "D:/estar-proj/microproduct-l-sar/atmosphericDelay-L-SAR/AtmosphericDelayMain.py", line 106, in check_source
self.__processing_paras = self.__init_processing_paras(self.__input_paras, self.__workspace_preprocessed_path) # 输出{文件名:地址}
File "D:/estar-proj/microproduct-l-sar/atmosphericDelay-L-SAR/AtmosphericDelayMain.py", line 151, in __init_processing_paras
file_path = BlockProcess.unzip_file(para_path, out_path)
File "D:\estar-proj\microproduct-l-sar\tool\algorithm\block\blockprocess.py", line 95, in unzip_file
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
File "D:\Anaconda\envs\micro\lib\zipfile.py", line 1251, in __init__
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\micro\\microproduct_depdence\\LT-Deformation\\ERA5_N27_N29_E99_E101_20230523_23.zip'

View File

@ -0,0 +1,3 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\atmosphericDelay-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!

View File

@ -0,0 +1,66 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}
INFO:mylog:decompose feature success!
INFO:mylog:progress bar: 50%
INFO:mylog:feature_list:['0: Freeman_Dbl_geo.tif', '1: Freeman_Odd_geo.tif', '2: Freeman_Vol_geo.tif', '3: HH_geo.tif', '4: HV_geo.tif', '5: VH_geo.tif', '6: VV_geo.tif', '7: Yamaguchi4_Dbl_geo.tif', '8: Yamaguchi4_Hlx_geo.tif', '9: Yamaguchi4_Odd_geo.tif', '10: Yamaguchi4_Vol_geo.tif']
INFO:mylog:gene_train_set success!
INFO:mylog:importances:[0.01345728 0.08030793 0.19998456 0.08862919 0.07922134 0.07908471
0.09141777 0.03486326 0.08361669 0.10833262 0.14108465],threshold=0.07
INFO:mylog:optimal_feature:[2, 10, 9, 6, 3, 8, 1, 4, 5]
INFO:mylog:correlation_map:
[[0. 0.8949268 0.35909693 0.540319 0.5255877 0.51631901
0.15386267 0.66493226 0.6532548 ]
[0. 0. 0.2082941 0.43162995 0.43429836 0.31024572
0.09145156 0.63592983 0.62960317]
[0. 0. 0. 0.80898481 0.79945993 0.08127209
0.9420081 0.04272205 0.02908987]
[0. 0. 0. 0. 0.75470725 0.08134001
0.72615951 0.21924918 0.20997542]
[0. 0. 0. 0. 0. 0.08638082
0.73653416 0.22030954 0.21031874]
[0. 0. 0. 0. 0. 0.
0.12765872 0.52023269 0.52175055]
[0. 0. 0. 0. 0. 0.
0. 0.03650561 0.04599542]
[0. 0. 0. 0. 0. 0.
0. 0. 0.65095718]
[0. 0. 0. 0. 0. 0.
0. 0. 0. ]]
INFO:mylog:validity_list_corr:[2 9 6 3 8 4 5]
INFO:mylog:[2 9 6 3 8 4 5]
INFO:mylog:train_feature:['2: Freeman_Vol_geo.tif' '9: Yamaguchi4_Odd_geo.tif' '6: VV_geo.tif'
'3: HH_geo.tif' '8: Yamaguchi4_Hlx_geo.tif' '4: HV_geo.tif'
'5: VH_geo.tif']
INFO:mylog:RF trainning
INFO:mylog:RF train successful
INFO:mylog:progress bar: 60%
INFO:mylog:block size is :3072
INFO:mylog:test_feature:dict_keys(['Freeman_Vol_geo', 'HH_geo', 'HV_geo', 'VH_geo', 'VV_geo', 'Yamaguchi4_Hlx_geo', 'Yamaguchi4_Odd_geo'])
INFO:mylog:blocking tifs success!
INFO:mylog:create features matrix success!
INFO:mylog:testing
INFO:mylog:test success!
INFO:mylog:progress bar: 95%
INFO:mylog:trans_tif2mask success, path: D:\micro\LWork\LandCover\Temporary\processing\tif_mask.tif
INFO:mylog:create ROI image success!
INFO:mylog:process_handle success!
INFO:mylog:successful production of LandCover products!
INFO:mylog:running use time: 0:28:08.480083

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:0 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:0 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:21 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif
INFO:mylog:total:25,block:21 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:1 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:1 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:16 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:16 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:2 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:2 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:15 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif
INFO:mylog:total:25,block:15 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:3 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:3 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:17 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:17 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:4 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:4 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:18 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:18 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:5 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:5 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:23 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:23 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:6 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:6 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:24 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif
INFO:mylog:total:25,block:24 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:7 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:7 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:20 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:20 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:8 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:8 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:22 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:22 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:9 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:9 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:19 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif
INFO:mylog:total:25,block:19 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:10 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:10 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:11 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:11 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:12 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:12 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:13 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:13 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:14 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:14 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif

View File

@ -0,0 +1,20 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}

View File

@ -0,0 +1,20 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}

View File

@ -0,0 +1,44 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}
INFO:mylog:decompose feature success!
INFO:mylog:progress bar: 50%
INFO:mylog:feature_list:[]
INFO:mylog:gene_train_set success!
ERROR:mylog:run-time error!
Traceback (most recent call last):
File "D:/estar-proj/microproduct-l-sar/landcover-L-SAR/LandCoverMain.py", line 689, in <module>
if main_handler.process_handle(start) is False:
File "D:/estar-proj/microproduct-l-sar/landcover-L-SAR/LandCoverMain.py", line 568, in process_handle
X_train, Y_train, optimal_feature = ml.gene_optimal_train_set(train_data_dic, feature_geo, 0.07, 0.85)
File "D:\estar-proj\microproduct-l-sar\tool\algorithm\ml\machineLearning.py", line 41, in gene_optimal_train_set
optimal_feature = ml.sel_optimal_feature_set(X_train, Y_train, threshold=important_threshold)
File "D:\estar-proj\microproduct-l-sar\tool\algorithm\ml\machineLearning.py", line 303, in sel_optimal_feature_set
model.fit(X_train, Y_train.astype('int'))
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\ensemble\_forest.py", line 326, in fit
X, y = self._validate_data(
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\base.py", line 572, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\utils\validation.py", line 956, in check_X_y
X = check_array(
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\utils\validation.py", line 806, in check_array
raise ValueError(
ValueError: Found array with 0 feature(s) (shape=(30000, 0)) while a minimum of 1 is required.
INFO:mylog:running use time: 0:11:18.197804

View File

@ -0,0 +1,44 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}
INFO:mylog:decompose feature success!
INFO:mylog:progress bar: 50%
INFO:mylog:feature_list:[]
INFO:mylog:gene_train_set success!
ERROR:mylog:run-time error!
Traceback (most recent call last):
File "D:/estar-proj/microproduct-l-sar/landcover-L-SAR/LandCoverMain.py", line 690, in <module>
raise Exception('preprocess_handle() failed!')
File "D:/estar-proj/microproduct-l-sar/landcover-L-SAR/LandCoverMain.py", line 569, in process_handle
# 生成最优特征子集训练集
File "D:\estar-proj\microproduct-l-sar\tool\algorithm\ml\machineLearning.py", line 41, in gene_optimal_train_set
optimal_feature = ml.sel_optimal_feature_set(X_train, Y_train, threshold=important_threshold)
File "D:\estar-proj\microproduct-l-sar\tool\algorithm\ml\machineLearning.py", line 303, in sel_optimal_feature_set
model.fit(X_train, Y_train.astype('int'))
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\ensemble\_forest.py", line 326, in fit
X, y = self._validate_data(
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\base.py", line 572, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\utils\validation.py", line 956, in check_X_y
X = check_array(
File "D:\Anaconda\envs\micro\lib\site-packages\sklearn\utils\validation.py", line 806, in check_array
raise ValueError(
ValueError: Found array with 0 feature(s) (shape=(30000, 0)) while a minimum of 1 is required.
INFO:mylog:running use time: 0:12:10.889075

View File

@ -0,0 +1,17 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%

View File

@ -0,0 +1,68 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:S2 to T3 success!
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:mylog:Freeman successful
INFO:mylog:Yamaguchi successful
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}
INFO:mylog:decompose feature success!
INFO:mylog:progress bar: 50%
INFO:mylog:feature_list:['0: Freeman_Dbl_geo.tif', '1: Freeman_Odd_geo.tif', '2: Freeman_Vol_geo.tif', '3: HH_cal_geo.tif', '4: HV_cal_geo.tif', '5: VH_cal_geo.tif', '6: VV_cal_geo.tif', '7: Yamaguchi4_Dbl_geo.tif', '8: Yamaguchi4_Hlx_geo.tif', '9: Yamaguchi4_Odd_geo.tif', '10: Yamaguchi4_Vol_geo.tif']
INFO:mylog:gene_train_set success!
INFO:mylog:importances:[0.01412884 0.07507139 0.19282871 0.09425074 0.08127264 0.0800713
0.09279422 0.03571493 0.08148785 0.10983892 0.14254045],threshold=0.07
INFO:mylog:optimal_feature:[2, 10, 9, 3, 6, 8, 4, 5, 1]
INFO:mylog:correlation_map:
[[0. 0.89974759 0.35986712 0.53728706 0.54356051 0.53799063
0.67882997 0.65708663 0.14666917]
[0. 0. 0.20476747 0.44040511 0.43246559 0.33815793
0.65350952 0.6342519 0.08000724]
[0. 0. 0. 0.78989342 0.80393551 0.06189867
0.05506056 0.03791309 0.93682793]
[0. 0. 0. 0. 0.75517487 0.11551733
0.23950707 0.22443111 0.71684797]
[0. 0. 0. 0. 0. 0.09838501
0.22526131 0.21092207 0.7125749 ]
[0. 0. 0. 0. 0. 0.
0.54144962 0.53694689 0.11393226]
[0. 0. 0. 0. 0. 0.
0. 0.67117044 0.02858808]
[0. 0. 0. 0. 0. 0.
0. 0. 0.03978259]
[0. 0. 0. 0. 0. 0.
0. 0. 0. ]]
INFO:mylog:validity_list_corr:[2 9 3 6 8 4 5]
INFO:mylog:[2 9 3 6 8 4 5]
INFO:mylog:train_feature:['2: Freeman_Vol_geo.tif' '9: Yamaguchi4_Odd_geo.tif' '3: HH_cal_geo.tif'
'6: VV_cal_geo.tif' '8: Yamaguchi4_Hlx_geo.tif' '4: HV_cal_geo.tif'
'5: VH_cal_geo.tif']
INFO:mylog:RF trainning
INFO:mylog:RF train successful
INFO:mylog:progress bar: 60%
INFO:mylog:block size is :3072
INFO:mylog:test_feature:dict_keys(['Freeman_Vol_geo', 'HH_cal_geo', 'HV_cal_geo', 'VH_cal_geo', 'VV_cal_geo', 'Yamaguchi4_Hlx_geo', 'Yamaguchi4_Odd_geo'])
INFO:mylog:blocking tifs success!
INFO:mylog:create features matrix success!
INFO:mylog:testing
INFO:mylog:test success!
INFO:mylog:progress bar: 95%
INFO:mylog:trans_tif2mask success, path: D:\micro\LWork\LandCover\Temporary\processing\tif_mask.tif
INFO:mylog:create ROI image success!
INFO:mylog:process_handle success!
INFO:mylog:successful production of LandCover products!

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:0 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:0 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:18 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:18 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:1 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:1 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:15 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif
INFO:mylog:total:25,block:15 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:2 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:2 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:16 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:16 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:3 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:3 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:17 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:17 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:4 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:4 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:19 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif
INFO:mylog:total:25,block:19 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:5 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:5 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:22 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:22 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:6 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:6 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:21 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif
INFO:mylog:total:25,block:21 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:7 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:7 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:20 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:20 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:8 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:8 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:23 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:23 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:9 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:9 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:24 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif
INFO:mylog:total:25,block:24 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:10 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:10 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:11 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:11 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:12 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:12 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:13 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:13 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif

View File

@ -0,0 +1,2 @@
INFO:mylog:total:25,block:14 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:14 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif

View File

@ -0,0 +1,69 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:S2 to T3 success!
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:mylog:Freeman successful
INFO:mylog:Yamaguchi successful
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}
INFO:mylog:decompose feature success!
INFO:mylog:progress bar: 50%
INFO:mylog:feature_list:['0: Freeman_Dbl_geo.tif', '1: Freeman_Odd_geo.tif', '2: Freeman_Vol_geo.tif', '3: HH_cal_geo.tif', '4: HV_cal_geo.tif', '5: VH_cal_geo.tif', '6: VV_cal_geo.tif', '7: Yamaguchi4_Dbl_geo.tif', '8: Yamaguchi4_Hlx_geo.tif', '9: Yamaguchi4_Odd_geo.tif', '10: Yamaguchi4_Vol_geo.tif']
INFO:mylog:gene_train_set success!
INFO:mylog:importances:[0.01414486 0.07175734 0.20167104 0.09536278 0.07942236 0.08267835
0.09132492 0.03566768 0.08239434 0.109387 0.13618934],threshold=0.07
INFO:mylog:optimal_feature:[2, 10, 9, 3, 6, 5, 8, 4, 1]
INFO:mylog:correlation_map:
[[0. 0.89671468 0.3476367 0.53154016 0.54603478 0.6627598
0.52659843 0.6846655 0.13586124]
[0. 0. 0.19075738 0.43859277 0.43134722 0.63474014
0.31180745 0.64948204 0.06985773]
[0. 0. 0. 0.77293233 0.79616044 0.02984477
0.07223252 0.04837735 0.93695043]
[0. 0. 0. 0. 0.74820557 0.23174254
0.11047347 0.24912058 0.70433096]
[0. 0. 0. 0. 0. 0.22269955
0.10172844 0.23929064 0.70476954]
[0. 0. 0. 0. 0. 0.
0.52780036 0.65145266 0.04949848]
[0. 0. 0. 0. 0. 0.
0. 0.53933103 0.1289393 ]
[0. 0. 0. 0. 0. 0.
0. 0. 0.03833884]
[0. 0. 0. 0. 0. 0.
0. 0. 0. ]]
INFO:mylog:validity_list_corr:[2 9 3 6 5 8 4]
INFO:mylog:[2 9 3 6 5 8 4]
INFO:mylog:train_feature:['2: Freeman_Vol_geo.tif' '9: Yamaguchi4_Odd_geo.tif' '3: HH_cal_geo.tif'
'6: VV_cal_geo.tif' '5: VH_cal_geo.tif' '8: Yamaguchi4_Hlx_geo.tif'
'4: HV_cal_geo.tif']
INFO:mylog:RF trainning
INFO:mylog:RF train successful
INFO:mylog:progress bar: 60%
INFO:mylog:block size is :3072
INFO:mylog:test_feature:dict_keys(['Freeman_Vol_geo', 'HH_cal_geo', 'HV_cal_geo', 'VH_cal_geo', 'VV_cal_geo', 'Yamaguchi4_Hlx_geo', 'Yamaguchi4_Odd_geo'])
INFO:mylog:blocking tifs success!
INFO:mylog:create features matrix success!
INFO:mylog:testing
INFO:mylog:test success!
INFO:mylog:progress bar: 95%
INFO:mylog:trans_tif2mask success, path: D:\micro\LWork\LandCover\Temporary\processing\tif_mask.tif
INFO:mylog:create ROI image success!
INFO:mylog:process_handle success!
INFO:mylog:successful production of LandCover products!
INFO:mylog:running use time: 0:21:33.897159

View File

@ -0,0 +1,50 @@
INFO:mylog:total:25,block:0 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:1 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:2 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:3 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:4 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:5 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:6 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:7 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:8 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:9 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:10 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:11 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:12 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:13 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:14 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:2 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:15 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif
INFO:mylog:total:25,block:3 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:1 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:16 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:0 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:17 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:4 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:18 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:7 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:19 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif
INFO:mylog:total:25,block:5 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:6 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:9 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:20 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:8 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:21 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif
INFO:mylog:total:25,block:22 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:12 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:10 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:23 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:24 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif
INFO:mylog:total:25,block:13 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:11 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:14 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:15 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif
INFO:mylog:total:25,block:18 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:17 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:19 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif
INFO:mylog:total:25,block:16 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:20 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:22 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:23 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:24 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif
INFO:mylog:total:25,block:21 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif

View File

@ -0,0 +1,27 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:S2 to T3 success!
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:mylog:Freeman successful
INFO:mylog:Yamaguchi successful
INFO:mylog:h_a_alpha_decomposition:h_a_alpha_decomposition_T3.exe -id D:\micro\LWork\LandCover\Temporary\processing\lee_filter\ -od D:\micro\LWork\LandCover\Temporary\processing\cloude\ -iodf T3 -nwr 1 -nwc 1 -ofr 0 -ofc 0 -fnr 11133 -fnc 11898 -fl1 1 -fl2 1 -fl3 1 -fl4 1 -fl5 1 -fl6 0 -fl7 0 -fl8 0 -fl9 0
INFO:mylog:cmd_result:1
INFO:mylog:h_a_alpha_decomposition finish!
INFO:mylog:Cloude successful
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif'}

View File

@ -0,0 +1,57 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:S2 to T3 success!
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:mylog:Freeman successful
INFO:mylog:Yamaguchi successful
INFO:mylog:h_a_alpha_decomposition:h_a_alpha_decomposition_T3.exe -id D:\micro\LWork\LandCover\Temporary\processing\lee_filter\ -od D:\micro\LWork\LandCover\Temporary\processing\cloude\ -iodf T3 -nwr 1 -nwc 1 -ofr 0 -ofc 0 -fnr 11133 -fnc 11898 -fl1 1 -fl2 1 -fl3 1 -fl4 1 -fl5 1 -fl6 0 -fl7 0 -fl8 0 -fl9 0
INFO:mylog:cmd_result:1
INFO:mylog:h_a_alpha_decomposition finish!
INFO:mylog:Cloude successful
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif', 'alpha': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\alpha.tif', 'anisotropy': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\anisotropy.tif', 'beta': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\beta.tif', 'delta': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\delta.tif', 'entropy': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\entropy.tif', 'gamma': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\gamma.tif', 'lambda': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\lambda.tif'}
INFO:mylog:decompose feature success!
INFO:mylog:progress bar: 50%
INFO:mylog:feature_list:['0: alpha_geo.tif', '1: anisotropy_geo.tif', '2: beta_geo.tif', '3: delta_geo.tif', '4: entropy_geo.tif', '5: Freeman_Dbl_geo.tif', '6: Freeman_Odd_geo.tif', '7: Freeman_Vol_geo.tif', '8: gamma_geo.tif', '9: HH_cal_geo.tif', '10: HV_cal_geo.tif', '11: lambda_geo.tif', '12: VH_cal_geo.tif', '13: VV_cal_geo.tif', '14: Yamaguchi4_Dbl_geo.tif', '15: Yamaguchi4_Hlx_geo.tif', '16: Yamaguchi4_Odd_geo.tif', '17: Yamaguchi4_Vol_geo.tif']
INFO:mylog:gene_train_set success!
INFO:mylog:importances:[0.04243552 0.03856858 0.03860305 0.03825556 0.0544434 0.00930963
0.04649529 0.13388621 0.03712781 0.05561918 0.04821517 0.11412619
0.04731822 0.05507362 0.02246368 0.05211185 0.06919178 0.09675525],threshold=0.07
INFO:mylog:optimal_feature:[7, 11, 17]
INFO:mylog:correlation_map:
[[0. 0.73122274 0.89183846]
[0. 0. 0.60544646]
[0. 0. 0. ]]
INFO:mylog:validity_list_corr:[ 7 11]
INFO:mylog:[ 7 11]
INFO:mylog:train_feature:['7: Freeman_Vol_geo.tif' '11: lambda_geo.tif']
INFO:mylog:RF trainning
INFO:mylog:RF train successful
INFO:mylog:progress bar: 60%
INFO:mylog:block size is :3072
INFO:mylog:test_feature:dict_keys(['Freeman_Vol_geo', 'lambda_geo'])
INFO:mylog:blocking tifs success!
INFO:mylog:create features matrix success!
INFO:mylog:testing
INFO:mylog:test success!
INFO:mylog:progress bar: 95%
INFO:mylog:trans_tif2mask success, path: D:\micro\LWork\LandCover\Temporary\processing\tif_mask.tif
INFO:mylog:create ROI image success!
INFO:mylog:process_handle success!
INFO:mylog:successful production of LandCover products!
INFO:mylog:running use time: 0:33:10.184935

View File

@ -0,0 +1,4 @@
INFO:mylog:total:25,block:0 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:0 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:15 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif
INFO:mylog:total:25,block:15 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif

View File

@ -0,0 +1,46 @@
INFO:mylog:total:25,block:1 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:2 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:3 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:4 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:5 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:6 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:7 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:8 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:9 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:10 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:11 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:12 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:13 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:14 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:1 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:16 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:5 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:17 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:4 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:18 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:2 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:6 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:19 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif
INFO:mylog:total:25,block:10 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:20 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:11 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:21 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif
INFO:mylog:total:25,block:22 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:3 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:23 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:7 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:24 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif
INFO:mylog:total:25,block:9 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:8 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:12 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:13 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:14 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:16 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:21 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif
INFO:mylog:total:25,block:20 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:17 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:22 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:23 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:19 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif
INFO:mylog:total:25,block:18 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:24 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif

View File

@ -0,0 +1,57 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\landcover-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:1,water,num:89608
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:2,road,num:148509
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:3,crop,num:45047
INFO:mylog:max number =10000, random select10000 point as train data!
INFO:mylog:read csv data success!
INFO:mylog:progress bar: 20%
INFO:mylog:S2 to T3 success!
INFO:mylog:refine_lee filter success!
INFO:mylog:progress bar: 30%
INFO:mylog:Freeman successful
INFO:mylog:Yamaguchi successful
INFO:mylog:h_a_alpha_decomposition:h_a_alpha_decomposition_T3.exe -id D:\micro\LWork\LandCover\Temporary\processing\lee_filter\ -od D:\micro\LWork\LandCover\Temporary\processing\cloude\ -iodf T3 -nwr 1 -nwc 1 -ofr 0 -ofc 0 -fnr 11133 -fnc 11898 -fl1 1 -fl2 1 -fl3 1 -fl4 1 -fl5 1 -fl6 0 -fl7 0 -fl8 0 -fl9 0
INFO:mylog:cmd_result:1
INFO:mylog:h_a_alpha_decomposition finish!
INFO:mylog:Cloude successful
INFO:root:feature_tif_paths:{'Freeman_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Dbl.tif', 'Freeman_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Odd.tif', 'Freeman_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Freeman_Vol.tif', 'Yamaguchi4_Dbl': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Dbl.tif', 'Yamaguchi4_Hlx': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Hlx.tif', 'Yamaguchi4_Odd': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Odd.tif', 'Yamaguchi4_Vol': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\Yamaguchi4_Vol.tif', 'alpha': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\alpha.tif', 'anisotropy': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\anisotropy.tif', 'beta': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\beta.tif', 'delta': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\delta.tif', 'entropy': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\entropy.tif', 'gamma': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\gamma.tif', 'lambda': 'D:\\micro\\LWork\\LandCover\\Temporary\\processing\\feature_tif\\lambda.tif'}
INFO:mylog:decompose feature success!
INFO:mylog:progress bar: 50%
INFO:mylog:feature_list:['0: alpha_geo.tif', '1: anisotropy_geo.tif', '2: beta_geo.tif', '3: delta_geo.tif', '4: entropy_geo.tif', '5: Freeman_Dbl_geo.tif', '6: Freeman_Odd_geo.tif', '7: Freeman_Vol_geo.tif', '8: gamma_geo.tif', '9: HH_cal_geo.tif', '10: HV_cal_geo.tif', '11: lambda_geo.tif', '12: VH_cal_geo.tif', '13: VV_cal_geo.tif', '14: Yamaguchi4_Dbl_geo.tif', '15: Yamaguchi4_Hlx_geo.tif', '16: Yamaguchi4_Odd_geo.tif', '17: Yamaguchi4_Vol_geo.tif']
INFO:mylog:gene_train_set success!
INFO:mylog:importances:[0.04308777 0.03910861 0.03836704 0.03794918 0.05433519 0.0092633
0.04355022 0.14265478 0.0371669 0.05762053 0.04809142 0.10952059
0.04512283 0.05463628 0.02220882 0.05268669 0.06660613 0.09802372],threshold=0.07
INFO:mylog:optimal_feature:[7, 11, 17]
INFO:mylog:correlation_map:
[[0. 0.74300848 0.89326303]
[0. 0. 0.61786099]
[0. 0. 0. ]]
INFO:mylog:validity_list_corr:[ 7 11]
INFO:mylog:[ 7 11]
INFO:mylog:train_feature:['7: Freeman_Vol_geo.tif' '11: lambda_geo.tif']
INFO:mylog:RF trainning
INFO:mylog:RF train successful
INFO:mylog:progress bar: 60%
INFO:mylog:block size is :3072
INFO:mylog:test_feature:dict_keys(['Freeman_Vol_geo', 'lambda_geo'])
INFO:mylog:blocking tifs success!
INFO:mylog:create features matrix success!
INFO:mylog:testing
INFO:mylog:test success!
INFO:mylog:progress bar: 95%
INFO:mylog:trans_tif2mask success, path: D:\micro\LWork\LandCover\Temporary\processing\tif_mask.tif
INFO:mylog:create ROI image success!
INFO:mylog:process_handle success!
INFO:mylog:successful production of LandCover products!
INFO:mylog:running use time: 0:39:56.377000

View File

@ -0,0 +1,20 @@
INFO:mylog:total:25,block:0 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:1 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:2 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:3 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:4 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:0 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_0_3072.tif
INFO:mylog:total:25,block:15 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif
INFO:mylog:total:25,block:1 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_11883_14955.tif
INFO:mylog:total:25,block:16 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:3 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_6144_9216.tif
INFO:mylog:total:25,block:19 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif
INFO:mylog:total:25,block:4 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_9216_12288.tif
INFO:mylog:total:25,block:2 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_0_3072_3072_6144.tif
INFO:mylog:total:25,block:21 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif
INFO:mylog:total:25,block:22 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:15 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_0_3072.tif
INFO:mylog:total:25,block:16 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_11883_14955.tif
INFO:mylog:total:25,block:21 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_11883_14955.tif
INFO:mylog:total:25,block:22 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_3072_6144.tif
INFO:mylog:total:25,block:19 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_9216_12288.tif

View File

@ -0,0 +1,30 @@
INFO:mylog:total:25,block:5 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:6 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:7 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:8 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:9 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:10 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:11 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:12 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:13 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:14 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:5 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_0_3072.tif
INFO:mylog:total:25,block:17 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:6 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_11883_14955.tif
INFO:mylog:total:25,block:18 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:10 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_0_3072.tif
INFO:mylog:total:25,block:20 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:11 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_11883_14955.tif
INFO:mylog:total:25,block:23 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:7 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_3072_6144.tif
INFO:mylog:total:25,block:9 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_9216_12288.tif
INFO:mylog:total:25,block:24 testing data !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif
INFO:mylog:total:25,block:12 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_3072_6144.tif
INFO:mylog:total:25,block:8 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_3072_6144_6144_9216.tif
INFO:mylog:total:25,block:14 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_9216_12288.tif
INFO:mylog:total:25,block:13 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_6144_9216_6144_9216.tif
INFO:mylog:total:25,block:20 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_0_3072.tif
INFO:mylog:total:25,block:17 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_3072_6144.tif
INFO:mylog:total:25,block:18 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9216_12288_6144_9216.tif
INFO:mylog:total:25,block:23 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_6144_9216.tif
INFO:mylog:total:25,block:24 test data finished !path:D:\micro\LWork\LandCover\Temporary\processing\LandCover\LandCover_9653_12725_9216_12288.tif

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,71 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\soilSalinity-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:mylog:progress bar: 10%
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.40576233571758, 47.936153520704124], [131.8327786879565, 47.936153520704124], [130.40576233571758, 47.10644445056424], [131.8327786879565, 47.10644445056424]]
INFO:root:scope2:[[130.00427774930557, 49.00453605317449], [132.01632432267647, 49.00453605317449], [130.00427774930557, 47.00425741002555], [132.01632432267647, 47.00425741002555]]
INFO:root:scope3:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut Covering success!
INFO:mylog:cut NDVI success!
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:progress bar: 15%
INFO:mylog:ahv transform to polsarpro T3 matrix success!
INFO:mylog:progress bar: 20%
INFO:mylog:Refined_lee process success!
INFO:mylog:run h_a_alpha_decomposition_T3!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3!
INFO:mylog:run h_a_alpha_eigenvector_set_T3!
INFO:mylog:[<multiprocessing.pool.ApplyResult object at 0x000001E4A427CAF0>, <multiprocessing.pool.ApplyResult object at 0x000001E4A427CD60>, <multiprocessing.pool.ApplyResult object at 0x000001E4CAB00E50>]
INFO:mylog:progress bar: 60%
INFO:mylog:run h_a_alpha_decomposition_T3 success!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3 success!
INFO:mylog:run h_a_alpha_eigenvector_set_T3 success!
INFO:mylog:blocking tifs success!
INFO:mylog:create features matrix success!
INFO:mylog:total:10,num:0 create train set success!
INFO:mylog:total:10,num:1 create train set success!
INFO:mylog:total:10,num:2 create train set success!
INFO:mylog:total:10,num:3 create train set success!
INFO:mylog:total:10,num:4 create train set success!
INFO:mylog:total:10,num:5 create train set success!
INFO:mylog:total:10,num:6 create train set success!
INFO:mylog:total:10,num:7 create train set success!
INFO:mylog:total:10,num:8 create train set success!
INFO:mylog:total:10,num:9 create train set success!
INFO:mylog:importances:[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0.],threshold=0.01
INFO:mylog:optimal_feature:[]
ERROR:mylog:optimal_feature is empty
INFO:mylog:correlation_map:
[[0. 0.49083635 0.01543203 ... 0.0050694 0.48048091 0.30563205]
[0. 0. 0.42248336 ... 0.38187007 0.36356837 0.22691555]
[0. 0. 0. ... 0.55728056 0.40270879 0.57369525]
...
[0. 0. 0. ... 0. 0.35506876 0.94258042]
[0. 0. 0. ... 0. 0. 0.13771427]
[0. 0. 0. ... 0. 0. 0. ]]
INFO:mylog:validity_list_corr:[ 0 29 30 31 33 35 37 39 46 47 48 51 8 9 10 16 17 18 20]
INFO:mylog:[ 0 29 30 31 33 35 37 39 46 47 48 51 8 9 10 16 17 18 20]
INFO:mylog:feature_list:['alpha1', 'alpha2', 'alpha3', 'alpha', 'anisotropy12', 'anisotropy', 'anisotropy_lueneburg', 'asymetry', 'beta1', 'beta2', 'beta3', 'beta', 'combination_1mH1mA', 'combination_1mHA', 'combination_H1mA', 'combination_HA', 'delta1', 'delta2', 'delta3', 'delta', 'derd', 'derd_norm', 'entropy', 'entropy_shannon', 'entropy_shannon_I', 'entropy_shannon_I_norm', 'entropy_shannon_norm', 'entropy_shannon_P', 'entropy_shannon_P_norm', 'gamma1', 'gamma2', 'gamma3', 'gamma', 'l1', 'l2', 'l3', 'lambda', 'p1', 'p2', 'p3', 'pedestal', 'polarisation_fraction', 'rvi', 'serd', 'serd_norm', 'T11', 'T12_imag', 'T12_real', 'T13_imag', 'T13_real', 'T22', 'T23_imag', 'T23_real', 'T33']
INFO:mylog:train_feature:['alpha1' 'gamma1' 'gamma2' 'gamma3' 'l1' 'l3' 'p1' 'p3' 'T12_imag'
'T12_real' 'T13_imag' 'T23_imag' 'beta1' 'beta2' 'beta3' 'delta1'
'delta2' 'delta3' 'derd']
INFO:mylog:generating training set success!
INFO:mylog:progress bar: 80%
INFO:mylog:PLS is training!
INFO:mylog:train PLS success!
INFO:mylog:test data success!
INFO:mylog:trans_tif2mask success, path: D:\micro\LWork\SoilSalinity\Temporary\processing\/roi/ndvi_mask.tif
INFO:mylog:combine_mask success, path: D:\micro\LWork\SoilSalinity\Temporary\processing\/roi/bare_land_mask.tif
INFO:mylog:combine_mask success, path: D:\micro\LWork\SoilSalinity\Temporary\processing\/roi/bare_land_mask.tif
INFO:mylog:create masks success!
INFO:mylog:cal_roi success, path: D:\micro\LWork\SoilSalinity\Temporary\processing\product\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-ortho-SSAA.tif
INFO:mylog:process_handle success!
INFO:mylog:progress bar: 100%
INFO:mylog:successful production of SoilSalinity products!
INFO:mylog:running use time: 1:19:13.603073

View File

@ -0,0 +1,34 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\soilSalinity-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:mylog:progress bar: 10%
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.40576233571758, 47.936153520704124], [131.8327786879565, 47.936153520704124], [130.40576233571758, 47.10644445056424], [131.8327786879565, 47.10644445056424]]
INFO:root:scope2:[[130.00427774930557, 49.00453605317449], [132.01632432267647, 49.00453605317449], [130.00427774930557, 47.00425741002555], [132.01632432267647, 47.00425741002555]]
INFO:root:scope3:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut Covering success!
INFO:mylog:cut NDVI success!
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:progress bar: 15%
INFO:mylog:ahv transform to polsarpro T3 matrix success!
INFO:mylog:progress bar: 20%
INFO:mylog:Refined_lee process success!
INFO:mylog:run h_a_alpha_decomposition_T3!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3!
INFO:mylog:run h_a_alpha_eigenvector_set_T3!
INFO:mylog:[<multiprocessing.pool.ApplyResult object at 0x000001A380FDB550>, <multiprocessing.pool.ApplyResult object at 0x000001A380FDB5E0>, <multiprocessing.pool.ApplyResult object at 0x000001A380FDB910>]
INFO:mylog:progress bar: 60%
INFO:mylog:run h_a_alpha_decomposition_T3 success!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3 success!
INFO:mylog:run h_a_alpha_eigenvector_set_T3 success!
ERROR:mylog:run-time error!
Traceback (most recent call last):
File "D:/estar-proj/microproduct-l-sar/soilSalinity-L-SAR/SoilSalinityMain.py", line 456, in <module>
if main_handler.process_handle(start) is False:
File "D:/estar-proj/microproduct-l-sar/soilSalinity-L-SAR/SoilSalinityMain.py", line 322, in process_handle
for num, feature in zip(len(features), features):
TypeError: 'int' object is not iterable
INFO:mylog:running use time: 0:29:00.916825

View File

@ -0,0 +1,26 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\soilSalinity-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:mylog:progress bar: 10%
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.40576233571758, 47.936153520704124], [131.8327786879565, 47.936153520704124], [130.40576233571758, 47.10644445056424], [131.8327786879565, 47.10644445056424]]
INFO:root:scope2:[[130.00427774930557, 49.00453605317449], [132.01632432267647, 49.00453605317449], [130.00427774930557, 47.00425741002555], [132.01632432267647, 47.00425741002555]]
INFO:root:scope3:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut Covering success!
INFO:mylog:cut NDVI success!
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:progress bar: 15%
INFO:mylog:ahv transform to polsarpro T3 matrix success!
INFO:mylog:progress bar: 20%
INFO:mylog:Refined_lee process success!
INFO:mylog:run h_a_alpha_decomposition_T3!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3!
INFO:mylog:run h_a_alpha_eigenvector_set_T3!
INFO:mylog:[<multiprocessing.pool.ApplyResult object at 0x00000191878EB580>, <multiprocessing.pool.ApplyResult object at 0x00000191AE091FA0>, <multiprocessing.pool.ApplyResult object at 0x00000191AE17DF40>]
INFO:mylog:progress bar: 60%
INFO:mylog:run h_a_alpha_decomposition_T3 success!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3 success!
INFO:mylog:run h_a_alpha_eigenvector_set_T3 success!

View File

@ -0,0 +1,26 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\soilSalinity-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:mylog:progress bar: 10%
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.40576233571758, 47.936153520704124], [131.8327786879565, 47.936153520704124], [130.40576233571758, 47.10644445056424], [131.8327786879565, 47.10644445056424]]
INFO:root:scope2:[[130.00427774930557, 49.00453605317449], [132.01632432267647, 49.00453605317449], [130.00427774930557, 47.00425741002555], [132.01632432267647, 47.00425741002555]]
INFO:root:scope3:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut Covering success!
INFO:mylog:cut NDVI success!
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:progress bar: 15%
INFO:mylog:ahv transform to polsarpro T3 matrix success!
INFO:mylog:progress bar: 20%
INFO:mylog:Refined_lee process success!
INFO:mylog:run h_a_alpha_decomposition_T3!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3!
INFO:mylog:run h_a_alpha_eigenvector_set_T3!
INFO:mylog:[<multiprocessing.pool.ApplyResult object at 0x0000020A6C3D1D60>, <multiprocessing.pool.ApplyResult object at 0x0000020A6C3D1E50>, <multiprocessing.pool.ApplyResult object at 0x0000020A6C4C1EE0>]
INFO:mylog:progress bar: 60%
INFO:mylog:run h_a_alpha_decomposition_T3 success!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3 success!
INFO:mylog:run h_a_alpha_eigenvector_set_T3 success!

View File

@ -0,0 +1,21 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\soilSalinity-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:mylog:progress bar: 10%
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.40576233571758, 47.936153520704124], [131.8327786879565, 47.936153520704124], [130.40576233571758, 47.10644445056424], [131.8327786879565, 47.10644445056424]]
INFO:root:scope2:[[130.00427774930557, 49.00453605317449], [132.01632432267647, 49.00453605317449], [130.00427774930557, 47.00425741002555], [132.01632432267647, 47.00425741002555]]
INFO:root:scope3:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut Covering success!
INFO:mylog:cut NDVI success!
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:progress bar: 15%
INFO:mylog:ahv transform to polsarpro T3 matrix success!
INFO:mylog:progress bar: 20%
INFO:mylog:Refined_lee process success!
INFO:mylog:run h_a_alpha_decomposition_T3!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3!
INFO:mylog:run h_a_alpha_eigenvector_set_T3!

View File

@ -0,0 +1,27 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\soilSalinity-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:mylog:progress bar: 10%
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.40576233571758, 47.936153520704124], [131.8327786879565, 47.936153520704124], [130.40576233571758, 47.10644445056424], [131.8327786879565, 47.10644445056424]]
INFO:root:scope2:[[130.00427774930557, 49.00453605317449], [132.01632432267647, 49.00453605317449], [130.00427774930557, 47.00425741002555], [132.01632432267647, 47.00425741002555]]
INFO:root:scope3:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut Covering success!
INFO:mylog:cut NDVI success!
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:progress bar: 15%
INFO:mylog:ahv transform to polsarpro T3 matrix success!
INFO:mylog:progress bar: 20%
INFO:mylog:Refined_lee process success!
INFO:mylog:run h_a_alpha_decomposition_T3!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3!
INFO:mylog:run h_a_alpha_eigenvector_set_T3!
INFO:mylog:[<multiprocessing.pool.ApplyResult object at 0x000001B70B76BC10>, <multiprocessing.pool.ApplyResult object at 0x000001B731FF0B50>, <multiprocessing.pool.ApplyResult object at 0x000001B731FF0F10>]
INFO:mylog:progress bar: 60%
INFO:mylog:run h_a_alpha_decomposition_T3 success!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3 success!
INFO:mylog:run h_a_alpha_eigenvector_set_T3 success!
INFO:mylog:blocking tifs success!

View File

@ -0,0 +1,27 @@
INFO:mylog:sysdir: D:\estar-proj\microproduct-l-sar\soilSalinity-L-SAR
INFO:mylog:init algXML succeed
INFO:mylog:create new workspace success!
INFO:mylog:check_source success!
INFO:mylog:progress bar: 10%
INFO:root:scope0:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope1:[[130.40576233571758, 47.936153520704124], [131.8327786879565, 47.936153520704124], [130.40576233571758, 47.10644445056424], [131.8327786879565, 47.10644445056424]]
INFO:root:scope2:[[130.00427774930557, 49.00453605317449], [132.01632432267647, 49.00453605317449], [130.00427774930557, 47.00425741002555], [132.01632432267647, 47.00425741002555]]
INFO:root:scope3:[[130.58930555555554, 47.875416666666666], [131.11458333333331, 47.875416666666666], [130.58930555555554, 47.428472222222226], [131.11458333333331, 47.428472222222226]]
INFO:root:scope roi :[(130.58930555555554, 47.428472222222226), (130.58930555555554, 47.875416666666666), (131.11458333333331, 47.875416666666666), (131.11458333333331, 47.428472222222226)]
INFO:mylog:cut Covering success!
INFO:mylog:cut NDVI success!
INFO:mylog:cut sim_ori success!
INFO:mylog:preprocess_handle success!
INFO:mylog:progress bar: 15%
INFO:mylog:ahv transform to polsarpro T3 matrix success!
INFO:mylog:progress bar: 20%
INFO:mylog:Refined_lee process success!
INFO:mylog:run h_a_alpha_decomposition_T3!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3!
INFO:mylog:run h_a_alpha_eigenvector_set_T3!
INFO:mylog:[<multiprocessing.pool.ApplyResult object at 0x000001961AB95A60>, <multiprocessing.pool.ApplyResult object at 0x000001964138E670>, <multiprocessing.pool.ApplyResult object at 0x000001964138E610>]
INFO:mylog:progress bar: 60%
INFO:mylog:run h_a_alpha_decomposition_T3 success!
INFO:mylog:run h_a_alpha_eigenvalue_set_T3 success!
INFO:mylog:run h_a_alpha_eigenvector_set_T3 success!
INFO:mylog:blocking tifs success!

View File

@ -0,0 +1,236 @@
# -*- coding: UTF-8 -*-
"""
@Project:__init__.py
@File:AHVToPolsarpro.py
@Function:全极化影像转成polsarpro格式T3数据
@Contact:
@Author:SHJ
@Date:2021/9/18 16:44
@Version:1.0.0
"""
import os
import numpy as np
import glob
import struct
from tool.algorithm.image.ImageHandle import ImageHandler
class AHVToPolsarpro:
"""
全极化影像转换为bin格式T3矩阵支持polsarpro处理
"""
def __init__(self):
pass
@staticmethod
def __ahv_to_s2(ahv_dir):
"""
全极化影像转S2矩阵
:param ahv_dir: 全极化影像文件夹路径
:return: 极化散射矩阵S2
"""
in_tif_paths = list(glob.glob(os.path.join(ahv_dir, '*.tif')))
if in_tif_paths == []:
in_tif_paths = list(glob.glob(os.path.join(ahv_dir, '*.tiff')))
flag_list = [0, 0, 0, 0]
for in_tif_path in in_tif_paths:
# 读取原始SAR影像
proj, geotrans, data = ImageHandler.read_img(in_tif_path)
# 获取极化类型
if 'HH' in os.path.basename(in_tif_path):
data_real = data[0, :, :]
data_imag = data[1, :, :]
s11 = data_real + 1j * data_imag
flag_list[0] = 1
elif 'HV' in os.path.basename(in_tif_path):
data_real = data[0, :, :]
data_imag = data[1, :, :]
s12 = data_real + 1j * data_imag
flag_list[1] = 1
elif 'VH' in os.path.basename(in_tif_path):
data_real = data[0, :, :]
data_imag = data[1, :, :]
s21 = data_real + 1j * data_imag
flag_list[2] = 1
elif 'VV' in os.path.basename(in_tif_path):
data_real = data[0, :, :]
data_imag = data[1, :, :]
s22 = data_real + 1j * data_imag
flag_list[3] = 1
else:
continue
if not flag_list == [1, 1, 1, 1]:
raise Exception('tif of HH or HV or VH or VV is not in path :%s', ahv_dir)
return s11, s12, s21, s22
@staticmethod
def __s2_to_t3(s11, s12, s21, s22):
"""
S2矩阵转T3矩阵
:param s11: HH极化数据
:param s12: HV极化数据
:param s21: VH极化数据
:param s22: VV极化数据
:return: 极化相干矩阵T3
"""
HH = s11
HV = s12
VH = s21
VV = s22
t11 = (np.abs(HH + VV)) ** 2 / 2
t12 = (HH + VV) * np.conj(HH - VV) / 2
t13 = (HH + VV) * np.conj(HV + VH)
t21 = (HH - VV) * np.conj(HH + VV) / 2
t22 = np.abs(HH - VV) ** 2 / 2
t23 = (HH - VV) * np.conj(HV + VH)
t31 = (HV + VH) * np.conj(HH + VV)
t32 = (HV + VH) * np.conj(HH - VV)
t33 = 2 * np.abs(HV + VH) ** 2
return t11, t12, t13, t21, t22, t23, t31, t32, t33
def __t3_to_polsarpro_t3(self, out_dir, t11, t12, t13, t22, t23, t33):
"""
T3矩阵转bin格式支持 polsarpro处理
:param out_dir: 输出的文件夹路径
:param t11:
:param t12:
:param t13:
:param t22:
:param t23:
:param t33:
:return: bin格式矩阵T3和头文件
"""
if not os.path.exists(out_dir):
os.makedirs(out_dir)
rows = t11.shape[0]
cols = t11.shape[1]
bins_dict = {'T11.bin': t11, 'T12_real.bin': t12.real, 'T12_imag.bin': t12.imag,
'T13_real.bin': t13.real, 'T13_imag.bin': t13.imag,'T22.bin': t22,
'T23_real.bin': t23.real, 'T23_imag.bin': t23.imag, 'T33.bin': t33}
for name, data in bins_dict.items():
bin_path = os.path.join(out_dir, name)
self.__write_img_bin(data, bin_path)
out_hdr_path = bin_path+'.hdr'
self.__write_bin_hdr(out_hdr_path, bin_path, rows, cols)
self.__write_config_file(out_dir, rows, cols)
@staticmethod
def __write_img_bin(im, file_path):
"""
写入影像到bin文件中保存为float32类型
:param im : 影像矩阵数据暂支持单通道影像数据
:param file_path: bin文件的完整路径
"""
with open(file_path, 'wb') as f:
rows =im.shape[0]
cols = im.shape[1]
for row in range(rows):
im_bin = struct.pack("f" * cols, *np.reshape(im[row, :], (cols, 1), order='F'))
f.write(im_bin)
# # if 是否为复数形式
# #方案1
# for row in range(rows):
# im_bin = struct.pack("f"*cols, *np.reshape(im[row, :].real, (cols, 1), order='F'))
# f.write(im_bin)
# for row in range(rows):
# im_bin = struct.pack("f" * cols, *np.reshape(im[row, :].imag, (cols, 1), order='F'))
# f.write(im_bin)
# #方案2
# for row in range(rows):
# im_bin = struct.pack("f" * cols, *np.reshape(im[row, :].real, (cols, 1), order='F'))
# f.write(im_bin)
# im_bin = struct.pack("f" * cols, *np.reshape(im[row, :].imag, (cols, 1), order='F'))
# f.write(im_bin)
# #else 非复数
# for row in range(rows):
# im_bin = struct.pack("f" * cols, *np.reshape(im[row, :], (cols, 1), order='F'))
# f.write(im_bin)
f.close()
@staticmethod
def __write_bin_hdr(out_hdr_path, bin_path, rows, cols):
"""
写入影像的头文件
:param out_hdr_path : 头文件的路径
:param bin_path: bin文件的路径
:param rows: 影像的行数
:param cols: 影像的列数
"""
h1 = 'Envi'
h2 = 'description = {'
h3 = 'File Imported into ENVI. }'
h4 = 'samples = ' + str(cols) # 列
h5 = 'lines = ' + str(rows) # 行
h6 = 'bands = 1 ' # 波段数
h7 = 'header offset = 0'
h8 = 'file type = ENVI Standard'
h9 = 'data type = 4' # 数据格式
h10 = 'interleave = bsq' # 存储格式
h11 = 'sensor type = Unknown'
h12 = 'byte order = 0'
h13 = 'band names = {'
h14 = bin_path + '}'
h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14]
doc = open(out_hdr_path, 'w')
for i in range(0, 14):
print(h[i], end='', file=doc)
print('\n', end='', file=doc)
doc.close()
@staticmethod
def __write_config_file(out_config_dir, rows, cols):
"""
写入polsarpro配置文件
:param out_config_dir : 配置文件路径
:param rows: 影像的行数
:param cols: 影像的列数
"""
h1 = 'Nrow'
h2 = str(rows)
h3 = '---------'
h4 = 'Ncol'
h5 = str(cols)
h6 = '---------'
h7 = 'PolarCase'
h8 = 'monostatic'
h9 = '---------'
h10 = 'PolarType'
h11 = 'full'
h = [h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11]
out_config_path = os.path.join(out_config_dir, 'config.txt')
doc = open(out_config_path, 'w')
for i in range(0, 11):
print(h[i], end='', file=doc)
print('\n', end='', file=doc)
doc.close()
def ahv_to_polsarpro_t3(self, out_file_dir, in_ahv_dir):
s11, s12, s21, s22 = self.__ahv_to_s2(in_ahv_dir)
t11, t12, t13, t21, t22, t23, t31, t32, t33 = self.__s2_to_t3(s11, s12, s21, s22)
self.__t3_to_polsarpro_t3(out_file_dir, t11, t12, t13, t22, t23, t33)
if __name__ == '__main__':
# atp = AHVToPolsarpro()
# ahv_path = 'D:\\DATA\\GAOFEN3\\2-GF3_MYN_WAV_020086_E107.2_N27.6_20200603_L1A_AHV_L10004843087\\'
# # ahv_path = 'D:\\DATA\\GAOFEN3\\2598957_Paris\\'
# out_file_path = 'D:\\bintest0923\\'
# atp.ahv_to_polsarpro_t3(out_file_path, ahv_path)
print("done")

View File

@ -0,0 +1,455 @@
# -*- coding: UTF-8 -*-
"""
@Project microproduct
@File SoilSalinityMain.py
@Author SHJ
@Contact土壤盐碱度算法主函数
@Date 2021/9/6
@Version 1.0.0
修改历史
[修改序列] [修改日期] [修改者] [修改内容]
1 2022-6-27 石海军 1.增加配置文件config.ini; 2.内部处理使用地理坐标系(4326)
"""
import logging
import shutil
from tool.algorithm.algtools.MetaDataHandler import Calibration
from tool.algorithm.algtools.PreProcess import PreProcess as pp
from tool.algorithm.image.ImageHandle import ImageHandler
from tool.algorithm.polsarpro.pspLeeRefinedFilterT3 import LeeRefinedFilterT3
from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource, InitPara
from tool.algorithm.algtools.logHandler import LogHandler
from tool.algorithm.algtools.ROIAlg import ROIAlg as roi
from tool.algorithm.block.blockprocess import BlockProcess
from tool.algorithm.xml.AnalysisXml import xml_extend
from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml
from tool.file.fileHandle import fileHandle
# from AHVToPolsarpro import AHVToPolsarpro
from tool.algorithm.polsarpro.AHVToPolsarpro import AHVToPolsarpro
from pspHAAlphaDecomposition import PspHAAlphaDecomposition
import scipy.spatial.transform
import scipy.spatial.transform._rotation_groups # 用于解决打包错误
import scipy.special.cython_special # 用于解决打包错误
from sklearn.cross_decomposition import PLSRegression
from tool.algorithm.xml.CreatMetafile import CreateMetafile
from SoilSalinityXmlInfo import CreateDict, CreateStadardXmlFile
import os
import datetime
import numpy as np
from PIL import Image
import sys
from tool.config.ConfigeHandle import Config as cf
from tool.csv.csvHandle import csvHandle
from tool.algorithm.transforml1a.transHandle import TransImgL1A
from tool.algorithm.ml.machineLearning import MachineLeaning as ml
import multiprocessing
csvh = csvHandle()
soil_salinity_value_min = float(cf.get('product_value_min'))
soil_salinity_value_max = float(cf.get('product_value_max'))
pixelspace=float(cf.get('pixelspace'))
tar = r'-' + cf.get('tar')
productLevel = cf.get('productLevel')
if cf.get('debug') == 'True':
DEBUG = True
else:
DEBUG = False
EXE_NAME = cf.get('exe_name')
# env_str = os.path.split(os.path.realpath(__file__))[0]
env_str =os.path.dirname(os.path.abspath(sys.argv[0]))
os.environ['PROJ_LIB'] = env_str
LogHandler.init_log_handler('run_log\\'+EXE_NAME)
logger = logging.getLogger("mylog")
file = fileHandle(DEBUG)
class SalinityMain:
"""
算法主函数
"""
def __init__(self, alg_xml_path):
self.alg_xml_path = alg_xml_path
self.imageHandler = ImageHandler()
self.__alg_xml_handler = ManageAlgXML(alg_xml_path)
self.__check_handler = CheckSource(self.__alg_xml_handler)
self.__workspace_path, self.__out_para = None, None
self.__input_paras, self.__output_paras, self.__processing_paras, self.__preprocessed_paras = {}, {}, {}, {}
self.__feature_name_list = []
# 参考影像路径,坐标系
self.__ref_img_path, self.__proj = '', ''
# 宽/列数,高/行数
self.__cols, self.__rows = 0, 0
# 影像投影变换矩阵
self.__geo = [0, 0, 0, 0, 0, 0]
def check_source(self):
"""
检查算法相关的配置文件图像辅助文件是否齐全
"""
env_str = os.getcwd()
logger.info("sysdir: %s", env_str)
self.__check_handler.check_alg_xml()
self.__check_handler.check_run_env()
# 检查景影像是否为全极化
self.__input_paras = self.__alg_xml_handler.get_input_paras()
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()
self.__processing_paras = InitPara.init_processing_paras(self.__input_paras)
self.__processing_paras.update(self.get_tar_gz_inf(self.__processing_paras["sar_path0"]))
SrcImageName = os.path.split(self.__input_paras["AHV"]['ParaValue'])[1].split('.tar.gz')[0]
result_name = SrcImageName + tar + ".tar.gz"
self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', result_name)
self.__alg_xml_handler.write_out_para("SoilSalinityProduct", self.__out_para) #写入输出参数
logger.info('check_source success!')
logger.info('progress bar: 10%')
return True
def get_tar_gz_inf(self, tar_gz_path):
para_dic = {}
name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz')
file_dir = os.path.join(self.__workspace_preprocessing_path, name + '\\')
file.de_targz(tar_gz_path, file_dir)
# 元文件字典
# para_dic.update(InitPara.get_meta_dic(InitPara.get_meta_paths(file_dir, name), name))
para_dic.update(InitPara.get_meta_dic_new(InitPara.get_meta_paths(file_dir, name), name))
# tif路径字典
para_dic.update(InitPara.get_polarization_mode(InitPara.get_tif_paths(file_dir, name)))
parameter_path = os.path.join(file_dir, "orth_para.txt")
para_dic.update({"paraMeter": parameter_path})
return para_dic
def __create_work_space(self):
"""
删除原有工作区文件夹,创建新工作区文件夹
"""
self.__workspace_preprocessing_path = self.__workspace_path + EXE_NAME +'\\Temporary\\preprocessing\\'
self.__workspace_preprocessed_path = self.__workspace_path + EXE_NAME + '\\Temporary\\preprocessed\\'
self.__workspace_processing_path = self.__workspace_path + EXE_NAME + '\\Temporary\\processing\\'
self.__workspace_block_tif_path = self.__workspace_path + EXE_NAME + '\\Temporary\\blockTif\\'
self.__workspace_block_tif_processed_path = self.__workspace_path + EXE_NAME + '\\Temporary\\blockTifProcessed\\'
self.__product_dic = self.__workspace_processing_path + 'product\\'
path_list = [self.__workspace_preprocessing_path, self.__workspace_preprocessed_path,
self.__workspace_processing_path, self.__workspace_block_tif_path,
self.__workspace_block_tif_processed_path,self.__product_dic]
file.creat_dirs(path_list)
logger.info('create new workspace success!')
def del_temp_workspace(self):
"""
临时工作区
"""
if DEBUG is True:
return
path = self.__workspace_path + EXE_NAME + r"\Temporary"
if os.path.exists(path):
file.del_folder(path)
def preprocess_handle(self):
"""
预处理
"""
para_names_geo = ["Covering", "NDVI", 'sim_ori']
p = pp()
p.check_img_projection(self.__workspace_preprocessing_path, para_names_geo, self.__processing_paras)
#计算roi
scopes = ()
# scopes += (self.imageHandler.get_scope_ori_sim(self.__processing_paras['ori_sim']),)
scopes += (xml_extend(self.__processing_paras['META']).get_extend(),)
scopes += p.box2scope(self.__processing_paras['box'])
# 计算图像的轮廓,并求相交区域
intersect_shp_path = self.__workspace_preprocessing_path + 'IntersectPolygon.shp'
scopes_roi = p.cal_intersect_shp(intersect_shp_path, para_names_geo, self.__processing_paras, scopes)
#裁剪
# 裁剪图像:裁剪微波图像,裁剪其他图像
cutted_img_paths = p.cut_imgs(self.__workspace_preprocessing_path, para_names_geo, self.__processing_paras, intersect_shp_path)
self.__preprocessed_paras.update(cutted_img_paths)
para_names_l1a = ["HH", "VV", "HV", "VH"]
self.l1a_width = ImageHandler.get_img_width(self.__processing_paras['HH'])
self.l1a_height = ImageHandler.get_img_height(self.__processing_paras['HH'])
self._tr = TransImgL1A(self.__processing_paras['sim_ori'], scopes_roi, self.l1a_height, self.l1a_width) # 裁剪图像
for name in para_names_l1a:
out_path = os.path.join(self.__workspace_preprocessed_path, name + "_preprocessed.tif")
self._tr.cut_L1A(self.__processing_paras[name], out_path)
self.__preprocessed_paras.update({name: out_path})
logger.info('preprocess_handle success!')
logger.info('progress bar: 15%')
def resampleImgs(self, refer_img_path):
ndvi_rampling_path = self.__workspace_processing_path + "ndvi.tif"
pp.resampling_by_scale(self.__preprocessed_paras["NDVI"], ndvi_rampling_path, refer_img_path)
self.__preprocessed_paras["NDVI"] = ndvi_rampling_path
cover_rampling_path = self.__workspace_processing_path + "cover.tif"
pp.resampling_by_scale(self.__preprocessed_paras["Covering"], cover_rampling_path, refer_img_path)
self.__preprocessed_paras["Covering"] = cover_rampling_path
def create_roi(self):
"""
计算ROI掩膜
:return: 掩膜路径
"""
names = ['Covering', 'NDVI']
bare_land_mask_path = roi().roi_process(names, self.__workspace_processing_path + "/roi/", self.__processing_paras, self.__preprocessed_paras)
logger.info('create masks success!')
return bare_land_mask_path
def AHVToPolsarpro(self,out_dir):
atp = AHVToPolsarpro()
ahv_path = self.__workspace_preprocessed_path
t3_path = self.__workspace_processing_path+'psp_t3\\'
# atp.ahv_to_polsarpro_t3_soil(t3_path, ahv_path)
polarization = ['HH', 'HV', 'VH', 'VV']
calibration = Calibration.get_Calibration_coefficient(self.__processing_paras['Origin_META'], polarization)
tif_path = atp.calibration(calibration, in_ahv_dir=self.__workspace_preprocessed_path)
atp.ahv_to_polsarpro_t3_soil(t3_path, tif_path)
logger.info('ahv transform to polsarpro T3 matrix success!')
logger.info('progress bar: 20%')
# Lee滤波
leeFilter = LeeRefinedFilterT3()
lee_filter_path = os.path.join(self.__workspace_processing_path,
'lee_filter\\')
leeFilter.api_lee_refined_filter_T3('', t3_path, lee_filter_path, 0, 0, atp.rows(), atp.cols())
logger.info('Refined_lee process success!')
haa = PspHAAlphaDecomposition(normalization=True)
haa.api_creat_h_a_alpha_features(h_a_alpha_out_dir=out_dir,
h_a_alpha_decomposition_T3_path='h_a_alpha_decomposition_T3.exe' ,
h_a_alpha_eigenvalue_set_T3_path='h_a_alpha_eigenvalue_set_T3.exe' ,
h_a_alpha_eigenvector_set_T3_path='h_a_alpha_eigenvector_set_T3.exe',
polsarpro_in_dir=lee_filter_path)
def create_meta_file(self, product_path):
xml_path = "./model_meta.xml"
tem_folder = self.__workspace_path + EXE_NAME + r"\Temporary""\\"
image_path = product_path
out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif")
out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif")
# par_dict = CreateDict(image_path, [1, 1, 1, 1], out_path1, out_path2).calu_nature(start)
# model_xml_path = os.path.join(tem_folder, "creat_standard.meta.xml") # 输出xml路径
# CreateStadardXmlFile(xml_path, self.alg_xml_path, par_dict, model_xml_path).create_standard_xml()
# 文件夹打包
SrcImagePath = self.__input_paras["AHV"]['ParaValue']
paths = SrcImagePath.split(';')
SrcImageName = os.path.split(paths[0])[1].split('.tar.gz')[0]
# if len(paths) >= 2:
# for i in range(1, len(paths)):
# SrcImageName = SrcImageName + ";" + os.path.split(paths[i])[1].split('.tar.gz')[0]
# meta_xml_path = self.__product_dic + EXE_NAME + "Product.meta.xml"
# CreateMetafile(self.__processing_paras['META'], self.alg_xml_path, model_xml_path, meta_xml_path).process(
# SrcImageName)
model_path = "./product.xml"
meta_xml_path = os.path.join(self.__product_dic, SrcImageName + tar + ".meta.xml")
para_dict = CreateMetaDict(image_path, self.__processing_paras['Origin_META'], self.__workspace_processing_path,
out_path1, out_path2).calu_nature()
para_dict.update({"imageinfo_ProductName": "土壤盐碱度"})
para_dict.update({"imageinfo_ProductIdentifier": "SoilSalinity"})
para_dict.update({"imageinfo_ProductLevel": productLevel})
para_dict.update({"ProductProductionInfo_BandSelection": "1,2"})
CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml()
temp_folder = os.path.join(self.__workspace_path, EXE_NAME, 'Output')
out_xml = os.path.join(temp_folder, os.path.basename(meta_xml_path))
if os.path.exists(temp_folder) is False:
os.mkdir(temp_folder)
# CreateProductXml(para_dict, model_path, out_xml).create_standard_xml()
shutil.copy(meta_xml_path, out_xml)
def calInterpolation_bil_Wgs84_rc_sar_sigma(self, parameter_path, dem_rc, in_sar, out_sar):
'''
# std::cout << "mode 11";
# std::cout << "SIMOrthoProgram.exe 11 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path";
'''
exe_path = r".\baseTool\x64\Release\SIMOrthoProgram.exe"
exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 11, parameter_path,
dem_rc, in_sar, out_sar)
print(exe_cmd)
print(os.system(exe_cmd))
print("==========================================================================")
def process_handle(self, start):
"""
算法主处理函数
:return: True or False
"""
# 读取实测值,从经纬度坐标系转为图像坐标系
# measured_data_img = self._tr.tran_lonlats_to_L1A_rowcols(csvh.readcsv(self.__processing_paras['MeasuredData']), self.__processing_paras['ori_sim'])
measured_data_img = self._tr.tran_lonlats_to_L1A_rowcols(csvh.readcsv(self.__processing_paras['MeasuredData']),
self.__preprocessed_paras['sim_ori'], self.l1a_height,
self.l1a_width)
# if len(measured_data_img) < 4:
# raise ('实测数据不足,无法进行模型训练')
# 极化分解得到T3矩阵
out_dir = self.__workspace_processing_path+'psp_haalpha\\'
self.AHVToPolsarpro(out_dir)
# 分块
bp = BlockProcess()
rows = self.imageHandler.get_img_height(self.__preprocessed_paras['HH'])
cols = self.imageHandler.get_img_width(self.__preprocessed_paras['HH'])
block_size = bp.get_block_size(rows, cols)
bp.cut(out_dir, self.__workspace_block_tif_path, ['tif', 'tiff'], 'tif', block_size)
img_dir, img_name = bp.get_file_names(self.__workspace_block_tif_path, ['tif'])
dir_dict = bp.get_same_img(img_dir, img_name)
logger.info('blocking tifs success!')
# 54个特征矩阵合并为一个54维矩阵
for key in dir_dict:
key_name = key
block_num = len(dir_dict[key])
for n in range(block_num):
name = os.path.basename(dir_dict[key_name][n])
suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + \
name.split('_')[-1]
features_path = self.__workspace_block_tif_processed_path + "features\\features" + suffix
features_array = np.zeros((len(dir_dict), block_size, block_size), dtype='float32')
for m, value in zip(range(len(dir_dict)), dir_dict.values()):
features_array[m, :, :] = self.imageHandler.get_band_array(value[n], 1)
# 异常值转为0
features_array[np.isnan(features_array)] = 0.0
features_array[np.isinf(features_array)] = 0.0
self.imageHandler.write_img(features_path, "", [0, 0, 1, 0, 0, 1], features_array)
logger.info('create features matrix success!')
# for n in range(block_num):
# name = os.path.basename(dir_dict[key_name][n])
# suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + \
# name.split('_')[-1]
# features_path = self.__workspace_block_tif_processed_path + "features\\features" + suffix
# row = self.imageHandler.get_img_height(dir_dict[key_name][n])
# col = self.imageHandler.get_img_width(dir_dict[key_name][n])
# features_array = np.zeros((len(dir_dict), row, col), dtype='float32')
# for m, value in zip(range(len(dir_dict)), dir_dict.values()):
# features_array[m, :, :] = self.imageHandler.get_band_array(value[n], 1)
# # 异常值转为0
# features_array[np.isnan(features_array)] = 0.0
# features_array[np.isinf(features_array)] = 0.0
# self.imageHandler.write_img(features_path, "", [0, 0, 1, 0, 0, 1], features_array)
# logger.info('create features matrix success!')
# 生成训练集
block_features_dir, block_features_name = bp.get_file_names(self.__workspace_block_tif_processed_path + 'features\\', ['tif'])
X_train, Y_train = ml.gene_train_data(block_features_dir, rows, cols, block_size, measured_data_img)
optimal_feature = ml.sel_optimal_feature_set(X_train, Y_train, threshold=0.01)
optimal_feature = ml.remove_correlation_feature(X_train, optimal_feature, threshold=0.85)
X_train = X_train[:, optimal_feature]
feature_name_list = []
for name in dir_dict.keys():
feature_name_list.append(name)
logger.info('feature_list:%s', feature_name_list)
logger.info('train_feature:%s', np.array(feature_name_list)[optimal_feature])
logger.info('generating training set success!')
logger.info('progress bar: 80%')
# 训练模型
logger.info('PLS is training!')
pls = PLSRegression()
pls.fit(X_train, Y_train)
PLSRegression(copy=True, max_iter=1000, n_components=5, scale=True, tol=1e-06)
logger.info('train PLS success!')
# 预测
for path, name, n in zip(block_features_dir, block_features_name, range(len(block_features_dir))):
features_array = self.imageHandler.get_data(path)
X_test = np.reshape(features_array, (features_array.shape[0], features_array[0].size)).T
X_test = X_test[:, optimal_feature]
Y_test = pls.predict(X_test)
Y_test[Y_test < soil_salinity_value_min] = soil_salinity_value_min
Y_test[Y_test > soil_salinity_value_max] = soil_salinity_value_max
salinity_img = Y_test.reshape(features_array.shape[1], features_array.shape[2])
out_image = Image.fromarray(salinity_img)
suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + \
name.split('_')[-1]
out_path = self.__workspace_block_tif_processed_path + 'salinity\\' + 'salinity' + suffix
if not os.path.exists(self.__workspace_block_tif_processed_path + 'salinity\\'):
os.makedirs(self.__workspace_block_tif_processed_path + 'salinity\\')
out_image.save(out_path)
# logger.info('total:%s,block:%s test data success!', len(block_features_dir), n)
logger.info('test data success!')
# 合并预测后的影像
data_dir = self.__workspace_block_tif_processed_path + 'salinity\\'
out_path = self.__workspace_processing_path[0:-1]
bp.combine(data_dir, cols, rows, out_path, file_type=['tif'], datetype='float32')
# l1a图像坐标转换地理坐标
salinity_path = self.__workspace_processing_path + "salinity.tif"
SrcImageName = os.path.split(self.__input_paras["AHV"]['ParaValue'])[1].split('.tar.gz')[0] + tar + '.tif'
salinity_geo_path = os.path.join(self.__workspace_processing_path, SrcImageName)
self.calInterpolation_bil_Wgs84_rc_sar_sigma(self.__processing_paras['paraMeter'], self.__preprocessed_paras['sim_ori'], salinity_path, salinity_geo_path)
# self.inter_Range2Geo(self.__preprocessed_paras['ori_sim'], salinity_path, salinity_geo_path, pixelspace)
# self._tr.l1a_2_geo(self.__preprocessed_paras['ori_sim'], salinity_path, salinity_geo_path)
self.resampleImgs(salinity_geo_path)
# 生成roi区域
product_path = os.path.join(self.__product_dic, SrcImageName)
roi.cal_roi(product_path, salinity_geo_path, self.create_roi(), background_value=np.nan)
# 生成快视图
self.imageHandler.write_quick_view(product_path)
self.create_meta_file(product_path)
file.make_targz(self.__out_para, self.__product_dic)
logger.info('process_handle success!')
logger.info('progress bar: 100%')
if __name__ == '__main__':
multiprocessing.freeze_support()
start = datetime.datetime.now()
try:
if len(sys.argv) < 2:
xml_path = EXE_NAME + '.xml'
else:
xml_path = sys.argv[1]
main_handler = SalinityMain(xml_path)
if main_handler.check_source() is False:
raise Exception('check_source() failed!')
if main_handler.preprocess_handle() is False:
raise Exception('preprocess_handle() failed!')
if main_handler.process_handle(start) is False:
raise Exception('process_handle() failed!')
logger.info('successful production of ' + EXE_NAME + ' products!')
except Exception:
logger.exception("run-time error!")
finally:
main_handler.del_temp_workspace()
pass
end = datetime.datetime.now()
msg = 'running use time: %s ' % (end - start)
logger.info(msg)

View File

@ -0,0 +1,40 @@
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['SoilSalinityMain.py'],
pathex=[],
binaries=[],
datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')],
hiddenimports=['pyproj._compat'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='SoilSalinityMain',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )

View File

@ -0,0 +1,152 @@
<?xml version='1.0' encoding='utf-8'?>
<Root>
<TaskID>CSAR_202107275419_0001-0</TaskID>
<WorkSpace>D:\micro\LWork\</WorkSpace>
<AlgCompt>
<DataTransModel>File</DataTransModel>
<Artificial>ElementAlg</Artificial>
<AlgorithmName>SoilSalinity-C-SAR-V2.2</AlgorithmName>
<DllName>SoilSalinity-C-SAR-V2.2.exe</DllName>
<ChsName>土壤盐碱度产品</ChsName>
<AlgorithmDesc>微波卫星3-5级产品生产模型</AlgorithmDesc>
<AlgorithmAlias>SoilSalinity-C-SAR-V2.2-1</AlgorithmAlias>
<Version>2.2</Version>
<AlgorithmClass>陆表类产品_土壤盐碱度</AlgorithmClass>
<AlgorithmLevel>5</AlgorithmLevel>
<AlgoirthmID>SoilSalinity_中科卫星应用德清研究院_2.2</AlgoirthmID>
<Author>中科卫星应用德清研究院</Author>
<Type>景-算法</Type>
<jdkVersion>1.8</jdkVersion>
<algDevlanguage>python</algDevlanguage>
<Environment>
<IsCluster>0</IsCluster>
<ClusterNum>0</ClusterNum>
<OperatingSystem>Windows10</OperatingSystem>
<CPU>双核</CPU>
<Memory>4GB</Memory>
<Storage>2GB</Storage>
<NetworkCard>无需求</NetworkCard>
<Bandwidth>无需求</Bandwidth>
<GPU>无需求</GPU>
</Environment>
<Utility Satellite="GF3C" Sensor="MSS" Resolution="1" />
<Inputs ParameterNum="7">
<Parameter>
<ParaName>AHV</ParaName>
<ParaChsName>全极化影像</ParaChsName>
<Description>单景全极化影像</Description>
<ParaType>File</ParaType>
<DataType>tar.gz</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>
F:\MicroWorkspace\LT1B\LT230919\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-ortho.tar.gz
</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
<Parameter>
<ParaName>box</ParaName>
<ParaChsName>经纬度包围盒</ParaChsName>
<Description>经纬度包围盒SNWE。例子30.0;30.2;117.3;117.5,不填写则使用影像相交区域作为包围盒42.92;43.03;115.86;116.04</Description>
<ParaType>Value</ParaType>
<DataType>string</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>empty</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
<Parameter>
<ParaName>Covering</ParaName>
<ParaChsName>地表覆盖类型数据</ParaChsName>
<Description>经过地理定标WGS84的地表覆盖类型数据</Description>
<ParaType>File</ParaType>
<DataType>tif</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>F:\MicroWorkspace\LT1B\LT230919\LSAR_vegetationPhenology_LandCover.tif</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
<Parameter>
<ParaName>model</ParaName>
<ParaChsName>盐碱度反演模型</ParaChsName>
<Description>盐碱度反演模型</Description>
<ParaType>File</ParaType>
<DataType>zip</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>D:\micro\LWork\SoilSalinityTrain\Output\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-ortho-SSAA.zip</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
<Parameter>
<ParaName>CoveringIDs</ParaName>
<ParaChsName>地表覆盖类型数据的类别id</ParaChsName>
<Description>地表覆盖类型数据中植被区域、裸土区域的类别id,多个id使用“;”分割。示例GlobeLand30数据的cover_roi_ids = 1;4;5;6;7;11;10;20;30;50;60;70;71;72;73;74;80;90;255</Description>
<ParaType>Value</ParaType>
<DataType>string</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>empty</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
<Parameter>
<ParaName>NDVI</ParaName>
<ParaChsName>NDVI数据</ParaChsName>
<Description>经过地理定标WGS84的NDVI数据</Description>
<ParaType>File</ParaType>
<DataType>tif</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>F:\MicroWorkspace\LT1B\LT230919\LSAR_surfaceRougness_NDVI.tif</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
<Parameter>
<ParaName>NDVIScope</ParaName>
<ParaChsName>NDVI范围</ParaChsName>
<Description>NDVI最小值和NDVI最大值使用“;”分割</Description>
<ParaType>Value</ParaType>
<DataType>string</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>-1;1</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
</Inputs>
<Outputs ParameterNum="1">
<Parameter>
<ParaName>SoilSalinityProduct</ParaName>
<ParaChsName>土壤盐碱度产品</ParaChsName>
<Description>土壤盐碱度产品</Description>
<ParaType>File</ParaType>
<DataType>tar.gz</DataType>
<ParaSource>Man</ParaSource>
<ParaValue>D:\micro\LWork\SoilSalinityPredict\Output\LT1B_MONO_MYC_STRIP4_005860_E130.9_N47.7_20230327_SLC_AHV_L1A_0000086966-ortho-SSAA.tar.gz</ParaValue>
<MaxValue>DEFAULT</MaxValue>
<MinValue>DEFAULT</MinValue>
<OptionValue>DEFAULT</OptionValue>
<NoDataValue>DEFAULT</NoDataValue>
<filePath>DEFAULT</filePath>
</Parameter>
</Outputs>
</AlgCompt>
</Root>

View File

@ -0,0 +1,430 @@
# -*- coding: UTF-8 -*-
"""
@Project microproduct
@File SoilSalinityMain.py
@Author SHJ
@Contact土壤盐碱度算法主函数
@Date 2021/9/6
@Version 1.0.0
修改历史
[修改序列] [修改日期] [修改者] [修改内容]
1 2022-6-27 石海军 1.增加配置文件config.ini; 2.内部处理使用地理坐标系(4326)
"""
import logging
import shutil
import pickle
from tool.algorithm.algtools.MetaDataHandler import Calibration
from tool.algorithm.algtools.PreProcess import PreProcess as pp
from tool.algorithm.image.ImageHandle import ImageHandler
from tool.algorithm.polsarpro.pspLeeRefinedFilterT3 import LeeRefinedFilterT3
from tool.algorithm.xml.AlgXmlHandle import ManageAlgXML, CheckSource, InitPara
from tool.algorithm.algtools.logHandler import LogHandler
from tool.algorithm.algtools.ROIAlg import ROIAlg as roi
from tool.algorithm.block.blockprocess import BlockProcess
from tool.algorithm.xml.AnalysisXml import xml_extend
from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml
from tool.file.fileHandle import fileHandle
# from AHVToPolsarpro import AHVToPolsarpro
from tool.algorithm.polsarpro.AHVToPolsarpro import AHVToPolsarpro
from pspHAAlphaDecomposition import PspHAAlphaDecomposition
import scipy.spatial.transform
import scipy.spatial.transform._rotation_groups # 用于解决打包错误
import scipy.special.cython_special # 用于解决打包错误
from sklearn.cross_decomposition import PLSRegression
from tool.algorithm.xml.CreatMetafile import CreateMetafile
from SoilSalinityXmlInfo import CreateDict, CreateStadardXmlFile
import os
import datetime
import numpy as np
from PIL import Image
import sys
from tool.config.ConfigeHandle import Config as cf
from tool.csv.csvHandle import csvHandle
from tool.algorithm.transforml1a.transHandle import TransImgL1A
from tool.algorithm.ml.machineLearning import MachineLeaning as ml
import multiprocessing
pNum = cf.get('features')
optimal_feature = []
if pNum == 'all':
for i in range(54):
optimal_feature.append((i))
else:
featurs = pNum.split(',')
for n in featurs:
optimal_feature.append(int(n))
print(optimal_feature)
csvh = csvHandle()
soil_salinity_value_min = float(cf.get('product_value_min'))
soil_salinity_value_max = float(cf.get('product_value_max'))
pixelspace = float(cf.get('pixelspace'))
tar = r'-' + cf.get('tar')
productLevel = cf.get('productLevel')
if cf.get('debug') == 'True':
DEBUG = True
else:
DEBUG = False
EXE_NAME = cf.get('predict_exe_name')
# env_str = os.path.split(os.path.realpath(__file__))[0]
env_str = os.path.dirname(os.path.abspath(sys.argv[0]))
os.environ['PROJ_LIB'] = env_str
LogHandler.init_log_handler('run_log\\' + EXE_NAME)
logger = logging.getLogger("mylog")
file = fileHandle(DEBUG)
class SalinityMain:
"""
算法主函数
"""
def __init__(self, alg_xml_path):
self.alg_xml_path = alg_xml_path
self.imageHandler = ImageHandler()
self.__alg_xml_handler = ManageAlgXML(alg_xml_path)
self.__check_handler = CheckSource(self.__alg_xml_handler)
self.__workspace_path, self.__out_para = None, None
self.__input_paras, self.__output_paras, self.__processing_paras, self.__preprocessed_paras = {}, {}, {}, {}
self.__feature_name_list = []
# 参考影像路径,坐标系
self.__ref_img_path, self.__proj = '', ''
# 宽/列数,高/行数
self.__cols, self.__rows = 0, 0
# 影像投影变换矩阵
self.__geo = [0, 0, 0, 0, 0, 0]
def check_source(self):
"""
检查算法相关的配置文件图像辅助文件是否齐全
"""
env_str = os.getcwd()
logger.info("sysdir: %s", env_str)
self.__check_handler.check_alg_xml()
self.__check_handler.check_run_env()
# 检查景影像是否为全极化
self.__input_paras = self.__alg_xml_handler.get_input_paras()
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()
self.__processing_paras = InitPara.init_processing_paras(self.__input_paras, self.__workspace_preprocessed_path)
self.__processing_paras.update(self.get_tar_gz_inf(self.__processing_paras["sar_path0"]))
SrcImageName = os.path.split(self.__input_paras["AHV"]['ParaValue'])[1].split('.tar.gz')[0]
result_name = SrcImageName + tar + ".tar.gz"
self.__out_para = os.path.join(self.__workspace_path, EXE_NAME, 'Output', result_name)
self.__alg_xml_handler.write_out_para("SoilSalinityProduct", self.__out_para) # 写入输出参数
logger.info('check_source success!')
logger.info('progress bar: 10%')
return True
def get_tar_gz_inf(self, tar_gz_path):
para_dic = {}
name = os.path.split(tar_gz_path)[1].rstrip('.tar.gz')
file_dir = os.path.join(self.__workspace_preprocessing_path, name + '\\')
file.de_targz(tar_gz_path, file_dir)
# 元文件字典
# para_dic.update(InitPara.get_meta_dic(InitPara.get_meta_paths(file_dir, name), name))
para_dic.update(InitPara.get_meta_dic_new(InitPara.get_meta_paths(file_dir, name), name))
# tif路径字典
para_dic.update(InitPara.get_polarization_mode(InitPara.get_tif_paths(file_dir, name)))
parameter_path = os.path.join(file_dir, "orth_para.txt")
para_dic.update({"paraMeter": parameter_path})
return para_dic
def __create_work_space(self):
"""
删除原有工作区文件夹,创建新工作区文件夹
"""
self.__workspace_preprocessing_path = self.__workspace_path + EXE_NAME + '\\Temporary\\preprocessing\\'
self.__workspace_preprocessed_path = self.__workspace_path + EXE_NAME + '\\Temporary\\preprocessed\\'
self.__workspace_processing_path = self.__workspace_path + EXE_NAME + '\\Temporary\\processing\\'
self.__workspace_block_tif_path = self.__workspace_path + EXE_NAME + '\\Temporary\\blockTif\\'
self.__workspace_block_tif_processed_path = self.__workspace_path + EXE_NAME + '\\Temporary\\blockTifProcessed\\'
self.__product_dic = self.__workspace_processing_path + 'product\\'
path_list = [self.__workspace_preprocessing_path, self.__workspace_preprocessed_path,
self.__workspace_processing_path, self.__workspace_block_tif_path,
self.__workspace_block_tif_processed_path, self.__product_dic]
file.creat_dirs(path_list)
logger.info('create new workspace success!')
def del_temp_workspace(self):
"""
临时工作区
"""
if DEBUG is True:
return
path = self.__workspace_path + EXE_NAME + r"\Temporary"
if os.path.exists(path):
file.del_folder(path)
def preprocess_handle(self):
"""
预处理
"""
para_names_geo = ["Covering", "NDVI", 'sim_ori']
p = pp()
p.check_img_projection(self.__workspace_preprocessing_path, para_names_geo, self.__processing_paras)
# 计算roi
scopes = ()
# scopes += (self.imageHandler.get_scope_ori_sim(self.__processing_paras['ori_sim']),)
scopes += (xml_extend(self.__processing_paras['META']).get_extend(),)
scopes += p.box2scope(self.__processing_paras['box'])
# 计算图像的轮廓,并求相交区域
intersect_shp_path = self.__workspace_preprocessing_path + 'IntersectPolygon.shp'
scopes_roi = p.cal_intersect_shp(intersect_shp_path, para_names_geo, self.__processing_paras, scopes)
# 裁剪
# 裁剪图像:裁剪微波图像,裁剪其他图像
cutted_img_paths = p.cut_imgs(self.__workspace_preprocessing_path, para_names_geo, self.__processing_paras,
intersect_shp_path)
self.__preprocessed_paras.update(cutted_img_paths)
para_names_l1a = ["HH", "VV", "HV", "VH"]
self.l1a_width = ImageHandler.get_img_width(self.__processing_paras['HH'])
self.l1a_height = ImageHandler.get_img_height(self.__processing_paras['HH'])
self._tr = TransImgL1A(self.__processing_paras['sim_ori'], scopes_roi, self.l1a_height, self.l1a_width) # 裁剪图像
for name in para_names_l1a:
out_path = os.path.join(self.__workspace_preprocessed_path, name + "_preprocessed.tif")
self._tr.cut_L1A(self.__processing_paras[name], out_path)
self.__preprocessed_paras.update({name: out_path})
logger.info('preprocess_handle success!')
logger.info('progress bar: 15%')
def resampleImgs(self, refer_img_path):
ndvi_rampling_path = self.__workspace_processing_path + "ndvi.tif"
pp.resampling_by_scale(self.__preprocessed_paras["NDVI"], ndvi_rampling_path, refer_img_path)
self.__preprocessed_paras["NDVI"] = ndvi_rampling_path
cover_rampling_path = self.__workspace_processing_path + "cover.tif"
pp.resampling_by_scale(self.__preprocessed_paras["Covering"], cover_rampling_path, refer_img_path)
self.__preprocessed_paras["Covering"] = cover_rampling_path
def create_roi(self):
"""
计算ROI掩膜
:return: 掩膜路径
"""
names = ['Covering', 'NDVI']
bare_land_mask_path = roi().roi_process(names, self.__workspace_processing_path + "/roi/",
self.__processing_paras, self.__preprocessed_paras)
logger.info('create masks success!')
return bare_land_mask_path
def AHVToPolsarpro(self, out_dir):
atp = AHVToPolsarpro()
ahv_path = self.__workspace_preprocessed_path
t3_path = self.__workspace_processing_path + 'psp_t3\\'
# atp.ahv_to_polsarpro_t3_soil(t3_path, ahv_path)
polarization = ['HH', 'HV', 'VH', 'VV']
calibration = Calibration.get_Calibration_coefficient(self.__processing_paras['Origin_META'], polarization)
tif_path = atp.calibration(calibration, in_ahv_dir=self.__workspace_preprocessed_path)
atp.ahv_to_polsarpro_t3_soil(t3_path, tif_path)
logger.info('ahv transform to polsarpro T3 matrix success!')
logger.info('progress bar: 20%')
# Lee滤波
leeFilter = LeeRefinedFilterT3()
lee_filter_path = os.path.join(self.__workspace_processing_path,
'lee_filter\\')
leeFilter.api_lee_refined_filter_T3('', t3_path, lee_filter_path, 0, 0, atp.rows(), atp.cols())
logger.info('Refined_lee process success!')
haa = PspHAAlphaDecomposition(normalization=True)
haa.api_creat_h_a_alpha_features(h_a_alpha_out_dir=out_dir,
h_a_alpha_decomposition_T3_path='h_a_alpha_decomposition_T3.exe',
h_a_alpha_eigenvalue_set_T3_path='h_a_alpha_eigenvalue_set_T3.exe',
h_a_alpha_eigenvector_set_T3_path='h_a_alpha_eigenvector_set_T3.exe',
polsarpro_in_dir=lee_filter_path)
def create_meta_file(self, product_path):
xml_path = "./model_meta.xml"
tem_folder = self.__workspace_path + EXE_NAME + r"\Temporary""\\"
image_path = product_path
out_path1 = os.path.join(tem_folder, "trans_geo_projcs.tif")
out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif")
# par_dict = CreateDict(image_path, [1, 1, 1, 1], out_path1, out_path2).calu_nature(start)
# model_xml_path = os.path.join(tem_folder, "creat_standard.meta.xml") # 输出xml路径
# CreateStadardXmlFile(xml_path, self.alg_xml_path, par_dict, model_xml_path).create_standard_xml()
# 文件夹打包
SrcImagePath = self.__input_paras["AHV"]['ParaValue']
paths = SrcImagePath.split(';')
SrcImageName = os.path.split(paths[0])[1].split('.tar.gz')[0]
# if len(paths) >= 2:
# for i in range(1, len(paths)):
# SrcImageName = SrcImageName + ";" + os.path.split(paths[i])[1].split('.tar.gz')[0]
# meta_xml_path = self.__product_dic + EXE_NAME + "Product.meta.xml"
# CreateMetafile(self.__processing_paras['META'], self.alg_xml_path, model_xml_path, meta_xml_path).process(
# SrcImageName)
model_path = "./product.xml"
meta_xml_path = os.path.join(self.__product_dic, SrcImageName + tar + ".meta.xml")
para_dict = CreateMetaDict(image_path, self.__processing_paras['Origin_META'], self.__workspace_processing_path,
out_path1, out_path2).calu_nature()
para_dict.update({"imageinfo_ProductName": "土壤盐碱度"})
para_dict.update({"imageinfo_ProductIdentifier": "SoilSalinity"})
para_dict.update({"imageinfo_ProductLevel": productLevel})
para_dict.update({"ProductProductionInfo_BandSelection": "1,2"})
CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml()
temp_folder = os.path.join(self.__workspace_path, EXE_NAME, 'Output')
out_xml = os.path.join(temp_folder, os.path.basename(meta_xml_path))
if os.path.exists(temp_folder) is False:
os.mkdir(temp_folder)
# CreateProductXml(para_dict, model_path, out_xml).create_standard_xml()
shutil.copy(meta_xml_path, out_xml)
def calInterpolation_bil_Wgs84_rc_sar_sigma(self, parameter_path, dem_rc, in_sar, out_sar):
'''
# std::cout << "mode 11";
# std::cout << "SIMOrthoProgram-L-SAR.exe 11 in_parameter_path in_rc_wgs84_path in_ori_sar_path out_orth_sar_path";
'''
exe_path = r".\baseTool\x64\Release\SIMOrthoProgram-L-SAR.exe"
exe_cmd = r"set PROJ_LIB=.\baseTool\x64\Release; & {0} {1} {2} {3} {4} {5}".format(exe_path, 11, parameter_path,
dem_rc, in_sar, out_sar)
# print(exe_cmd)
os.system(exe_cmd)
# print(os.system(exe_cmd))
# print("==========================================================================")
def process_handle(self, start):
"""
算法主处理函数
:return: True or False
"""
# 极化分解得到T3矩阵
out_dir = self.__workspace_processing_path + 'psp_haalpha\\'
self.AHVToPolsarpro(out_dir)
# 分块
bp = BlockProcess()
rows = self.imageHandler.get_img_height(self.__preprocessed_paras['HH'])
cols = self.imageHandler.get_img_width(self.__preprocessed_paras['HH'])
block_size = bp.get_block_size(rows, cols)
bp.cut(out_dir, self.__workspace_block_tif_path, ['tif', 'tiff'], 'tif', block_size)
img_dir, img_name = bp.get_file_names(self.__workspace_block_tif_path, ['tif'])
dir_dict = bp.get_same_img(img_dir, img_name)
logger.info('blocking tifs success!')
# 54个特征矩阵合并为一个54维矩阵
for key in dir_dict:
key_name = key
block_num = len(dir_dict[key])
for n in range(block_num):
name = os.path.basename(dir_dict[key_name][n])
suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + \
name.split('_')[-1]
features_path = self.__workspace_block_tif_processed_path + "features\\features" + suffix
features_array = np.zeros((len(dir_dict), block_size, block_size), dtype='float32')
for m, value in zip(range(len(dir_dict)), dir_dict.values()):
features_array[m, :, :] = self.imageHandler.get_band_array(value[n], 1)
# 异常值转为0
features_array[np.isnan(features_array)] = 0.0
features_array[np.isinf(features_array)] = 0.0
self.imageHandler.write_img(features_path, "", [0, 0, 1, 0, 0, 1], features_array)
logger.info('create features matrix success!')
# 生成训练集
block_features_dir, block_features_name = bp.get_file_names(
self.__workspace_block_tif_processed_path + 'features\\', ['tif'])
# optimal_feature = [0, 1, 2, 3]
model_path = self.__processing_paras['model']
with open(model_path, 'rb') as mod:
pls = pickle.load(mod)
logger.info('load PLS model success!')
# 预测
for path, name, n in zip(block_features_dir, block_features_name, range(len(block_features_dir))):
features_array = self.imageHandler.get_data(path)
X_test = np.reshape(features_array, (features_array.shape[0], features_array[0].size)).T
X_test = X_test[:, list(optimal_feature)]
Y_test = pls.predict(X_test)
Y_test[Y_test < soil_salinity_value_min] = soil_salinity_value_min
Y_test[Y_test > soil_salinity_value_max] = soil_salinity_value_max
salinity_img = Y_test.reshape(features_array.shape[1], features_array.shape[2])
out_image = Image.fromarray(salinity_img)
suffix = '_' + name.split('_')[-4] + "_" + name.split('_')[-3] + "_" + name.split('_')[-2] + "_" + \
name.split('_')[-1]
out_path = self.__workspace_block_tif_processed_path + 'salinity\\' + 'salinity' + suffix
if not os.path.exists(self.__workspace_block_tif_processed_path + 'salinity\\'):
os.makedirs(self.__workspace_block_tif_processed_path + 'salinity\\')
out_image.save(out_path)
# logger.info('total:%s,block:%s test data success!', len(block_features_dir), n)
logger.info('test data success!')
# 合并预测后的影像
data_dir = self.__workspace_block_tif_processed_path + 'salinity\\'
out_path = self.__workspace_processing_path[0:-1]
bp.combine(data_dir, cols, rows, out_path, file_type=['tif'], datetype='float32')
# l1a图像坐标转换地理坐标
salinity_path = self.__workspace_processing_path + "salinity.tif"
SrcImageName = os.path.split(self.__input_paras["AHV"]['ParaValue'])[1].split('.tar.gz')[0] + tar + '.tif'
salinity_geo_path = os.path.join(self.__workspace_processing_path, SrcImageName)
self.calInterpolation_bil_Wgs84_rc_sar_sigma(self.__processing_paras['paraMeter'],
self.__preprocessed_paras['sim_ori'], salinity_path, salinity_geo_path)
# self.inter_Range2Geo(self.__preprocessed_paras['ori_sim'], salinity_path, salinity_geo_path, pixelspace)
# self._tr.l1a_2_geo(self.__preprocessed_paras['ori_sim'], salinity_path, salinity_geo_path)
self.resampleImgs(salinity_geo_path)
# 生成roi区域
product_path = os.path.join(self.__product_dic, SrcImageName)
roi.cal_roi(product_path, salinity_geo_path, self.create_roi(), background_value=-9999)
# 生成快视图
self.imageHandler.write_quick_view(product_path)
self.create_meta_file(product_path)
file.make_targz(self.__out_para, self.__product_dic)
logger.info('process_handle success!')
logger.info('progress bar: 100%')
if __name__ == '__main__':
multiprocessing.freeze_support()
start = datetime.datetime.now()
try:
if len(sys.argv) < 2:
xml_path = EXE_NAME + '.xml'
else:
xml_path = sys.argv[1]
main_handler = SalinityMain(xml_path)
if main_handler.check_source() is False:
raise Exception('check_source() failed!')
if main_handler.preprocess_handle() is False:
raise Exception('preprocess_handle() failed!')
if main_handler.process_handle(start) is False:
raise Exception('process_handle() failed!')
logger.info('successful production of ' + EXE_NAME + ' products!')
except Exception:
logger.exception("run-time error!")
finally:
main_handler.del_temp_workspace()
pass
end = datetime.datetime.now()
msg = 'running use time: %s ' % (end - start)
logger.info(msg)

View File

@ -0,0 +1,40 @@
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['SoilSalinityPredictMain.py'],
pathex=[],
binaries=[],
datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')],
hiddenimports=['pyproj._compat'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='SoilSalinityPredictMain',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )

Some files were not shown because too many files have changed in this diff Show More