大气延迟校正新增处理全景
parent
57b2b0413c
commit
df8dc9472e
|
@ -125,7 +125,7 @@
|
|||
<ParaType>Value</ParaType>
|
||||
<DataType>string</DataType>
|
||||
<ParaSource>Man</ParaSource>
|
||||
<ParaValue>34.64;34.67;113.15;113.18</ParaValue>
|
||||
<ParaValue>empty</ParaValue>
|
||||
<EnModification>True</EnModification>
|
||||
<EnMultipleChoice>True</EnMultipleChoice>
|
||||
<Control>UploadInput</Control>
|
||||
|
|
|
@ -263,6 +263,9 @@ class AtmosphericMain:
|
|||
self.aux_key_word = key_word
|
||||
self.input_paras.update({"AuxiliarySarData": pa})
|
||||
if name == 'box':
|
||||
if para['ParaValue'] == 'empty':
|
||||
processing_paras.update({'box': 'empty'})
|
||||
else:
|
||||
datas = para['ParaValue'].split(';')
|
||||
if len(datas) != 4:
|
||||
msg = 'para: box is error!box:' + para['ParaValue']
|
||||
|
@ -1056,7 +1059,7 @@ class AtmosphericMain:
|
|||
dem_dir = r"/".join(self.__processing_paras['DEM'].split("\\"))
|
||||
isce_work_space = r"/".join(self.__workspace_isce_path.split("\\"))
|
||||
isce_work_space = '/cygdrive/' + isce_work_space.replace(":/", "/")
|
||||
box = "'" + self.__processing_paras['box'] + "'"
|
||||
|
||||
isce_exe_dir = r"/".join(os.path.join(self.env_str, "ISCEApp").split("\\"))
|
||||
|
||||
target = isce_work_space
|
||||
|
@ -1100,11 +1103,37 @@ class AtmosphericMain:
|
|||
logger.info('cmd_result:{}'.format(result))
|
||||
logger.info('slc to isce_data finish!')
|
||||
logger.info('progress bar: 10%')
|
||||
if self.__processing_paras['box'] == 'empty':
|
||||
|
||||
cmd = "stackStripMap.exe -s {} -w {} -d {} -m {} -a {} -r {} -u 'snaphu' --nofocus".format(
|
||||
out_slc_dir,
|
||||
isce_work_space,
|
||||
dem_path,
|
||||
self.aux_key_word, 10, 10)
|
||||
|
||||
logger.info('stackStripMap_cmd:{}'.format(cmd))
|
||||
result = os.system(cmd)
|
||||
logger.info('cmd_result:{}'.format(result))
|
||||
run_files = os.path.join(self.__workspace_isce_path, 'run_files')
|
||||
for file in list(glob.glob(os.path.join(run_files, '*.job'))):
|
||||
os.remove(file)
|
||||
logger.info('aux slc stackStripMap finish!')
|
||||
|
||||
# 1.2 执行autorun.py 生成干涉图
|
||||
run_steps = ["run_02_focus_split",
|
||||
"run_03_geo2rdr_coarseResamp",
|
||||
"run_04_refineSecondaryTiming",
|
||||
"run_05_invertMisreg",
|
||||
"run_06_fineResamp",
|
||||
"run_07_grid_baseline",
|
||||
"run_08_igram"]
|
||||
self.isce_run_steps(run_steps, self.__workspace_isce_path)
|
||||
else:
|
||||
box = "'" + self.__processing_paras['box'] + "'"
|
||||
cmd = "stackStripMap.exe -s {} -w {} -d {} -m {} -a {} -r {} -x {} -u 'snaphu' --nofocus".format(out_slc_dir,
|
||||
isce_work_space,
|
||||
dem_path,
|
||||
self.aux_key_word, 3, 3,
|
||||
self.aux_key_word, 10, 10,
|
||||
box)
|
||||
|
||||
|
||||
|
@ -1147,11 +1176,31 @@ class AtmosphericMain:
|
|||
# 二、 主影像
|
||||
# 2.1 执行stackSentinel.exe 生成运行配置文件 #
|
||||
# key_word = "20190113"
|
||||
if self.__processing_paras['box'] == 'empty':
|
||||
|
||||
cmd = "stackStripMap.exe -s {} -w {} -d {} -m {} -a {} -r {} -u 'snaphu' --nofocus".format(
|
||||
out_slc_dir,
|
||||
isce_work_space,
|
||||
dem_path,
|
||||
self.mas_key_word,
|
||||
10, 10)
|
||||
|
||||
logger.info('stackStripMap_cmd:{}'.format(cmd))
|
||||
result = os.system(cmd)
|
||||
logger.info('cmd_result:{}'.format(result))
|
||||
run_files = os.path.join(self.__workspace_isce_path, 'run_files')
|
||||
for file in list(glob.glob(os.path.join(run_files, '*.job'))):
|
||||
os.remove(file)
|
||||
logger.info('mas slc stackStripMap finish!')
|
||||
run_steps = ["run_07_grid_baseline"]
|
||||
self.isce_run_steps(run_steps, self.__workspace_isce_path)
|
||||
else:
|
||||
box = "'" + self.__processing_paras['box'] + "'"
|
||||
cmd = "stackStripMap.exe -s {} -w {} -d {} -m {} -a {} -r {} -x {} -u 'snaphu' --nofocus".format(out_slc_dir,
|
||||
isce_work_space,
|
||||
dem_path,
|
||||
self.mas_key_word,
|
||||
3, 3,
|
||||
10, 10,
|
||||
box)
|
||||
|
||||
logger.info('stackStripMap_cmd:{}'.format(cmd))
|
||||
|
@ -1161,6 +1210,8 @@ class AtmosphericMain:
|
|||
for file in list(glob.glob(os.path.join(run_files, '*.job'))):
|
||||
os.remove(file)
|
||||
logger.info('mas slc stackStripMap finish!')
|
||||
run_steps = ["run_08_grid_baseline"]
|
||||
self.isce_run_steps(run_steps, self.__workspace_isce_path)
|
||||
|
||||
# 2.2 执行autorun.py生成干涉图
|
||||
cmd = ['-e', isce_exe_dir, '-o', self.__workspace_isce_path]
|
||||
|
|
|
@ -133,7 +133,7 @@ def geoCoding(tree,X_min,X_max,Y_min,Y_max,block_size,value_data,target_arr):
|
|||
X_ids=XY_query[idx,0] # x
|
||||
Y_ids=XY_query[idx,1] # y
|
||||
XY_query=np.concatenate([X_ids.reshape(-1,1),Y_ids.reshape(-1,1)],axis=1)
|
||||
dist_mask=dist[:,3]<=2 ####################################################################################
|
||||
dist_mask=dist[:,3]<=1 ####################################################################################
|
||||
idx=np.where(dist_mask==1)
|
||||
ind=ind[idx,:][0,:,:]
|
||||
dist=dist[idx,:][0,:,:]
|
||||
|
|
|
@ -1060,38 +1060,11 @@ class TransImgL1A_ori:
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# ori_sim_path = r"I:\坐标转换\坐标转换接口\L1A数据(l1a_img_path数据)\RPC_ori_sim.tif"
|
||||
# roi_Extend = [[120.53, 31.5], [120.61, 31.5], [120.61, 31.45], [120.53, 31.45]]
|
||||
# conver_path = r"I:\坐标转换\坐标转换接口\裁剪后辅助数据(geo_img_path数据)\Covering_cut.tif"
|
||||
# ndvi_path = r"I:\坐标转换\坐标转换接口\裁剪后辅助数据(geo_img_path数据)\NDVI_cut.tif"
|
||||
# out_path = r"I:\坐标转换\SAR2GEO\test"
|
||||
#
|
||||
# tr = TransImgL1A(ori_sim_path,roi_Extend)
|
||||
# tr.l1a_2_geo("I:/cut.tif", "I:/salinity.tif", "I:/salinity_geo2.tif")
|
||||
ori_sim = r"D:\micro\LWork\AtmosphericDelay\Temporary\cut\ori_sim.tif"
|
||||
product_tif = r"D:\micro\LWork\AtmosphericDelay\Temporary\apsWork\master_ztd\dlosout.tiff"
|
||||
result = r"D:\micro\LWork\AtmosphericDelay\Temporary\apsWork\master_ztd\dlosout_geo.tiff"
|
||||
ori_sim = r"D:\micro\LWork\Dem-1\Temporary\processing\temp\ori_sim.tif"
|
||||
product_tif = r"D:\micro\LWork\Dem-1\Temporary\processing\temp\master_ztd\dlosout.tiff"
|
||||
result = r'D:\micro\LWork\Dem-1\Temporary\processing\temp\dlosout-geo.tif'
|
||||
method = 'linear'
|
||||
scopes = ImageHandle.ImageHandler().get_scopes(ori_sim)
|
||||
# """
|
||||
# 31.14;31.50;120.34;120.75
|
||||
# """
|
||||
# # roi_Extend = [[102.12, 33.879], [102.327, 33.879], [102.327, 33.66], [102.12, 31.45]]
|
||||
# ori_sim_data = ImageHandle.ImageHandler.get_data(ori_sim)
|
||||
# lon = ori_sim_data[0, :, :]
|
||||
# lat = ori_sim_data[1, :, :]
|
||||
# min_lon = np.nanmin(lon)
|
||||
# max_lon = np.nanmax(lon)
|
||||
# min_lat = np.nanmin(lat)
|
||||
# max_lat = np.nanmax(lat)
|
||||
# print(np.nanmin(lon))
|
||||
# print(np.nanmax(lon))
|
||||
# print(np.nanmin(lat))
|
||||
# print(np.nanmax(lat))
|
||||
#
|
||||
# # roi_Extend = [[min_lon, max_lat], [max_lon, max_lat], [min_lon, min_lat], [max_lon, min_lat]]
|
||||
# roi_Extend = [[116.17328, 43.727577], [116.652504, 43.727577], [116.652504, 44.119164], [116.17328, 44.119164]]
|
||||
# # roi_Extend = [[108.51960117899473, 38.192443138079895], [109.62308480328566, 38.192443138079895], [109.62308480328566, 37.69300142375064], [108.51960117899473, 37.69300142375064]]
|
||||
|
||||
tr = TransImgL1A_ori(ori_sim, scopes)
|
||||
tr.l1a_2_geo(ori_sim, product_tif, result, method)
|
||||
|
|
Loading…
Reference in New Issue