From c16232fd5744a1de9df66d0b33eab82563a1efb1 Mon Sep 17 00:00:00 2001 From: mnCompanyPC1 Date: Fri, 13 Oct 2023 17:28:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=97=E7=B3=99=E5=BA=A6=E4=B8=AD=E6=96=B9?= =?UTF-8?q?=E4=BD=8D=E8=A7=92=E6=B7=BB=E5=8A=A0=E6=96=B9=E5=BC=8F=E5=BE=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- surfaceRoughness_oh2004/SoilMoistureMain.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/surfaceRoughness_oh2004/SoilMoistureMain.py b/surfaceRoughness_oh2004/SoilMoistureMain.py index 3c86ff19..ee7412be 100644 --- a/surfaceRoughness_oh2004/SoilMoistureMain.py +++ b/surfaceRoughness_oh2004/SoilMoistureMain.py @@ -36,6 +36,7 @@ import datetime import numpy as np import sys import multiprocessing +import xml.etree.ElementTree as ET cover_id_list = [] threshold_of_ndvi_min = 0 threshold_of_ndvi_max = 0 @@ -315,8 +316,15 @@ class MoistureMain: par_dict = CreateDict(image_path, self.processinfo, out_path1, out_path2).calu_nature(start) # TODO:从原始文件的xml中获取得到方位角信息 SurfaceRoughness\Temporary\preprocessing\影像名\ 文件夹下 -ortho.meta.xml - Azimuth=self.__processing_paras['META'] - par_dict.update({"imageinfo_SatelliteAzimuth": "None"}) + # 这个添加方式有问题 待修改 + # 加载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路径