Files
BRDF/Flexbrdf/eph.py
2026-04-10 16:46:45 +08:00

21 lines
663 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import numpy as np
# 假设文件名为 f100506t01p00r07rdn_v_lonlat_eph
filename = r"E:\AVRIS\f100831t01p00r09.tar\f100831t01p00r09\f100831t01p00r09rdn_b\f100831t01p00r09rdn_b_eph"
# 读取所有双精度浮点数
data = np.fromfile(filename, dtype=np.float64)
# 每条扫描线有6个值重塑为二维数组行=扫描线,列=6
data = data.reshape(-1, 6)
# 现在 data 的每一行对应一条扫描线
lon = data[:, 1] # 经度
lat = data[:, 2] # 纬度
elev = data[:, 3] # 高程
# 示例打印前5条扫描线的经度
print("前5条经度", lon[:5])
print("前5条纬度", lat[:5])
print("前5条高程", elev[:5])