正射模块代码文件替换为正确的版本,basetool下exe替换
parent
031081d268
commit
a7afafa36d
|
@ -1156,6 +1156,8 @@ class Orthorectification(object):
|
|||
# 12、PRF
|
||||
HeaderInformation_json['PRF'] = float(
|
||||
FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['PRF']['NodePath']))
|
||||
HeaderInformation_json['Fs'] = float(
|
||||
FindInfomationFromJson(HeaderFile_dom_json, self.config['sensor']['Fs']['NodePath']))
|
||||
# 13、中心时间
|
||||
HeaderInformation_json['ImageInformation']['CenterTime'] = datetime.datetime.strptime(
|
||||
FindInfomationFromJson(HeaderFile_dom_json, self.config['imageinfo']['CenterImageTime']['NodePath']),
|
||||
|
@ -1178,6 +1180,7 @@ class Orthorectification(object):
|
|||
self.heightspace=HeaderInformation_json['ImageInformation']['ImageHeightSpace']
|
||||
self.refrange=HeaderInformation_json['ImageInformation']['refRange']
|
||||
self.nearrange=HeaderInformation_json['ImageInformation']['NearRange']
|
||||
self.Fs = HeaderInformation_json['Fs']*1e6 # Mhz
|
||||
return HeaderInformation_json
|
||||
pass
|
||||
|
||||
|
@ -1440,7 +1443,8 @@ class IndirectOrthorectification(Orthorectification):
|
|||
fp.write("{}\n".format(self.header_info['ImageInformation']['StartTime']))
|
||||
fp.write("{}\n".format(self.header_info['PRF']))
|
||||
fp.write("{}\n".format(self.refrange))
|
||||
fp.write("{}\n".format(self.widthspace))
|
||||
fp.write("{}\n".format(self.Fs))
|
||||
#fp.write("{}\n".format(self.widthspace))
|
||||
|
||||
# 多普勒系数
|
||||
fp.write("{}\n".format(len(self.header_info['ImageInformation']['DopplerCentroidCoefficients'])))
|
||||
|
@ -1602,6 +1606,32 @@ class IndirectOrthorectification(Orthorectification):
|
|||
print(os.system(exe_cmd))
|
||||
print("==========================================================================")
|
||||
|
||||
def calInterpolation_bil_Wgs84_rc_sar(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 lee_process_sar(self,in_sar, out_sar, win_size, noise_var):
|
||||
'''
|
||||
# std::cout << "mode 12"
|
||||
# std::cout << "SIMOrthoProgram.exe 12 in_sar_path out_sar_path win_size noise_var"
|
||||
'''
|
||||
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, 12, in_sar,
|
||||
out_sar, win_size, noise_var)
|
||||
print(exe_cmd)
|
||||
print(os.system(exe_cmd))
|
||||
print("==========================================================================")
|
||||
|
||||
|
||||
def getPowerTif(self,in_ori_path,out_power_path):
|
||||
'''
|
||||
std::cout << "mode 5: convert ori tiff to power tiff:";
|
||||
|
|
|
@ -126,7 +126,8 @@ class OrthoMain:
|
|||
|
||||
def check_source(self):
|
||||
"""
|
||||
检查算法相关的配置文件,图像,辅助文件是否齐全
|
||||
检查算法相关的配置文件,图
|
||||
像,辅助文件是否齐全
|
||||
"""
|
||||
if self.__check_handler.check_alg_xml() is False:
|
||||
return False
|
||||
|
@ -562,6 +563,15 @@ class OrthoMain:
|
|||
if(os.path.exists(this_out_dem_rc_path)):
|
||||
os.remove(this_out_dem_rc_path)
|
||||
|
||||
this_out_sar_sim_path = out_dir_path + "\\" + "sar_sim.tiff"
|
||||
if (os.path.exists(this_out_sar_sim_path)):
|
||||
os.remove(this_out_sar_sim_path)
|
||||
|
||||
this_out_sar_sim_wgs_path = out_dir_path + "\\" + "sar_sim_wgs.tiff" # // 经纬度与行列号映射
|
||||
if (os.path.exists(this_out_sar_sim_wgs_path)):
|
||||
os.remove(this_out_sar_sim_wgs_path)
|
||||
|
||||
|
||||
this_out_incidence_path = out_dir_path + "\\" + "incidentAngle.tiff"#// 入射角
|
||||
this_out_localIncidenct_path = out_dir_path + "\\" + "localincidentAngle.tiff"#// 局地入射角
|
||||
this_out_inc_angle_rpc_path = out_dir_path + "\\" + "RD_incidentAngle.tiff"#// 局地入射角
|
||||
|
@ -582,16 +592,17 @@ class OrthoMain:
|
|||
this_out_ori_sim_tiff = out_dir_path + "\\" + "RD_ori_sim.tif"#// 局地入射角
|
||||
if (os.path.exists(this_out_ori_sim_tiff)):
|
||||
shutil.move(this_out_ori_sim_tiff, out_dir_path + "\\" + "ori_sim-ortho.tif")
|
||||
this_in_rpc_lon_lat_path = this_out_ori_sim_tiff
|
||||
|
||||
this_out_sim_ori_tiff = out_dir_path + "\\" + "RD_sim_ori.tif" # // 局地入射角
|
||||
if (os.path.exists(this_out_sim_ori_tiff)):
|
||||
shutil.move(this_out_sim_ori_tiff, out_dir_path + "\\" + "sim_ori-ortho.tif")
|
||||
|
||||
# GTC 入射角
|
||||
GTC_rc_path=os.path.join(self.__workspace_package_path,"ori_sim-ortho.tif")
|
||||
GTC_out_path=self.__workspace_package_path
|
||||
|
||||
parameter_path = os.path.join(self.__workspace_package_path, "orth_para.txt")
|
||||
# ERROR 4: K:\mircoData\OutTest\Ortho\Temporary\dem_rc.tiff: No such file or directory报错
|
||||
# c++项目中this->dem_rc_path = JoinPath(out_dir_path, "RD_sim_ori.tif");路径不对
|
||||
#dem_rc = os.path.join(self.__workspace_Temporary_path, "dem_rc.tiff")
|
||||
dem_rc = os.path.join(self.__workspace_package_path, "RD_sim_ori.tif")
|
||||
dem_rc = os.path.join(self.__workspace_package_path, "sim_ori-ortho.tif")
|
||||
|
||||
in_tif_paths = list(glob.glob(os.path.join(slc_paths, '*.tiff')))
|
||||
for in_tif_path in in_tif_paths:
|
||||
|
@ -605,7 +616,7 @@ class OrthoMain:
|
|||
#inter_Range2Geo(self,lon_lat_path , data_tiff , grid_path , space)
|
||||
|
||||
# Orthorectification.inter_Range2Geo(GTC_rc_path,out_power_path,temp_slc_path,Orthorectification.heightspace)
|
||||
Orthorectification.calInterpolation_cubic_Wgs84_rc_sar_sigma(parameter_path, dem_rc, out_power_path, temp_slc_path)
|
||||
Orthorectification.calInterpolation_cubic_Wgs84_rc_sar_sigma(parameter_path, dem_rc, out_power_path, temp_slc_path) #
|
||||
break
|
||||
#Orth_Slc.append(temp_slc_path)
|
||||
# power_list.append(out_power_path)
|
||||
|
|
|
@ -91,6 +91,8 @@ sensor:
|
|||
lambda: # 波长
|
||||
NodePath:
|
||||
['product','sensor','lamda']
|
||||
|
||||
Fs: # 等效采样频率 eqvFs
|
||||
NodePath:
|
||||
['product','imageinfo','eqvFs']
|
||||
LightSpeed:
|
||||
299792458
|
||||
|
|
Loading…
Reference in New Issue