粗糙度模块中xml方位角参数的添加
parent
c16232fd57
commit
9218816d96
|
@ -22,6 +22,7 @@ from tool.algorithm.algtools.logHandler import LogHandler
|
|||
from SoilMoistureALg import MoistureAlg as alg
|
||||
from tool.algorithm.block.blockprocess import BlockProcess
|
||||
from tool.algorithm.algtools.MetaDataHandler import MetaDataHandler
|
||||
from tool.algorithm.xml.CreateMetaDict import CreateMetaDict, CreateProductXml
|
||||
from tool.config.ConfigeHandle import Config as cf
|
||||
from tool.algorithm.xml.CreatMetafile import CreateMetafile
|
||||
from tool.algorithm.algtools.ROIAlg import ROIAlg as roi
|
||||
|
@ -315,18 +316,6 @@ class MoistureMain:
|
|||
out_path2 = os.path.join(tem_folder, "trans_projcs_geo.tif")
|
||||
par_dict = CreateDict(image_path, self.processinfo, out_path1, out_path2).calu_nature(start)
|
||||
|
||||
# TODO:从原始文件的xml中获取得到方位角信息 SurfaceRoughness\Temporary\preprocessing\影像名\ 文件夹下 -ortho.meta.xml
|
||||
# 这个添加方式有问题 待修改
|
||||
# 加载XML文件
|
||||
# tree = ET.parse(self.__processing_paras['META'])
|
||||
# ## 获取根节点
|
||||
# root = tree.getroot()
|
||||
# # # 找到SatelliteAzimuth标签并获取其值
|
||||
# satellite_azimuth = root.find('.//SatelliteAzimuth')
|
||||
# if satellite_azimuth is not None:
|
||||
# par_dict.update({"productinfo_SatelliteAzimuth": satellite_azimuth})
|
||||
|
||||
|
||||
model_xml_path = os.path.join(tem_folder, "creat_standard.meta.xml") # 输出xml路径
|
||||
|
||||
id_min = 0
|
||||
|
@ -345,6 +334,27 @@ class MoistureMain:
|
|||
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)
|
||||
|
||||
#生成xml测试对比 231016 上面那个生成xml方式可以注释掉
|
||||
model_path = "./product.xml"
|
||||
meta_xml_path = os.path.join(self.__product_dic,
|
||||
os.path.basename(self.__out_para).replace(".tar.gz", ".meta.xml"))
|
||||
|
||||
para_dict = CreateMetaDict(image_path, self.__processing_paras['Origin_META'], self.__product_dic,
|
||||
out_path1, out_path2).calu_nature()
|
||||
para_dict.update({"ProductProductionInfo_BandSelection": "1,2"})
|
||||
|
||||
# 从原始文件的xml中获取得到方位角信息 SurfaceRoughness\Temporary\preprocessing\影像名\ 文件夹下 -ortho.meta.xml
|
||||
# 加载XML文件
|
||||
tree = ET.parse(self.__processing_paras['META'])
|
||||
## 获取根节点
|
||||
root = tree.getroot()
|
||||
# # 找到SatelliteAzimuth标签并获取其值
|
||||
satellite_azimuth = root.find('.//SatelliteAzimuth').text
|
||||
#if satellite_azimuth is not None:
|
||||
para_dict.update({"ObservationGeometry_SatelliteAzimuth": satellite_azimuth})
|
||||
CreateProductXml(para_dict, model_path, meta_xml_path).create_standard_xml()
|
||||
|
||||
|
||||
# 文件夹打包
|
||||
file.make_targz(self.__out_para, self.__product_dic)
|
||||
logger.info('process_handle success!')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<Root>
|
||||
<TaskID>CSAR_202107275419_0001-0</TaskID>
|
||||
<WorkSpace>K:\mircoData\OutTest\</WorkSpace>
|
||||
<WorkSpace>K:\mircoData\sufaceOut\</WorkSpace>
|
||||
<AlgCompt>
|
||||
<DataTransModel>File</DataTransModel>
|
||||
<Artificial>ElementAlg</Artificial>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<ParaType>File</ParaType>
|
||||
<DataType>tar.gz</DataType>
|
||||
<ParaSource>Man</ParaSource>
|
||||
<ParaValue>K:\mircoData\surfaceRoughnessData\GF3_MDJ_QPSI_031847_E116.4_N43.9_20220828_L1A_AHV_L10006708819-ortho.tar.gz</ParaValue>
|
||||
<ParaValue>K:\mircoData\surfaceRoughnessData\fakerData\GF3_MDJ_QPSI_031847_E116.4_N43.9_20220828_L1A_AHV_L10006708819-ortho.tar.gz</ParaValue>
|
||||
<EnModification>True</EnModification>
|
||||
<EnMultipleChoice>False</EnMultipleChoice>
|
||||
<Control>File</Control>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<ParaType>File</ParaType>
|
||||
<DataType>tar.gz</DataType>
|
||||
<ParaSource>Man</ParaSource>
|
||||
<ParaValue>K:\mircoData\OutTest\SurfaceRoughness\Output\SurfaceRoughnessProduct.tar.gz</ParaValue>
|
||||
<ParaValue>K:\mircoData\sufaceOut\SurfaceRoughness\Output\SurfaceRoughnessProduct.tar.gz</ParaValue>
|
||||
</Parameter>
|
||||
</Outputs>
|
||||
</AlgCompt>
|
||||
|
|
Loading…
Reference in New Issue