(1)在生成的300tc定标文件中添加生成时间;
(2)添加版本号:2.1;
This commit is contained in:
tangchao0503
2023-07-27 13:35:02 +08:00
parent fe8e2441c9
commit 32ccb25a0e
3 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import sys, traceback
from osgeo import gdal
from scipy.interpolate import interp1d
import spectral
import time
from PyQt5.QtWidgets import QMainWindow, QFileDialog, QApplication
from PyQt5.QtCore import Qt
@ -155,6 +156,7 @@ class RadianceCalibration():
def write_fields_to_hdrfile(self, fields, hdr_file):
header_tmp = spectral.envi.read_envi_header(hdr_file)
fields['generated time'] = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
with open(hdr_file, "a", encoding='utf-8') as f:
for key in fields.keys():
if key in header_tmp or key == "description":