Landsat数据认识—以及6s大气校正处理
- 1. Landsat卫星介绍
- 2. Landsat数据介绍
- 2.1 数据级别介绍
- 2.2 数据名称命名格式
- 3. Landsat数据波段信息介绍
- 3.1 Landsat 4-5 Thematic Mapper ( TM )
- 3.2 Landsat 7 Enhanced Thematic Mapper Plus (ETM+)
- 3.3 Landsat 8-9 Operational Land Imager (OLI) and Landsat 8-9 Thermal Infrared Sensor (TIRS)
- 4. Landsat数据预处理
- 4.1 python 代码
- 4.2 代码运行环境
- 4.3 代码运行结果
- 4.4 代码计算结果与ENVI处理结果对比
1. Landsat卫星介绍
Landsat卫星介绍信息来源于NASA官网。
陆地卫星计划由美国国家航空航天局(NASA)和美国地质调查局(USGS)共同管理,是一系列地球观测卫星任务的集合。自1972年以来,陆地卫星持续获取地球陆地表面图像,并提供不间断的数据存档,帮助土地管理者、规划者和政策制定者更科学地决策自然资源与环境问题。仅在2023年一年,陆地卫星提供的免费公开数据就为美国经济贡献了约256亿美元。
随着每次新卫星发射,陆地卫星长达数十年的数据记录变得愈发珍贵。作为地球上最长时间连续的空间记录,陆地卫星为研究长期变化的科学家提供了独特资源。研究人员利用其数据档案,研究了自20世纪70年代以来城市扩张、海岸线变迁、作物生长周期变化以及森林演替等现象。
这项开创性研究之所以成为可能,是因为陆地卫星经过精密校准、具备科学质量的档案,已成为卫星数据领域的“黄金标准”。该计划优先采用科学级仪器和数据,确保研究人员能够确信后续的Landsat图像中的变化反映了地表的实际变化。所有NASA数据均免费向公众开放,这意味着地球上任何地方的任何人都可以使用Landsat数据。
2. Landsat数据介绍
2.1 数据级别介绍
| 数据名称 | 数据是否可以获得 | 辐射校正 | 大气校正 | 几何校正 |
|---|---|---|---|---|
| Landsat Level-1 Data | √ | √ | × | √ |
| Landsat Level-2 Data | √ | √ | √ | √ |
| Landsat Level-3 Data | √ | √ | √ | √ |
- Landsat Level-1 Data
Landsat Level-1 产品包含经过校准的数字化数值,这些数值代表了多光谱图像数据。Level-1 数据被划分为不同的等级结构。最高等级的 Level-1 数据经过了辐射校正,并且通过地面控制点以及数字高程模型数据进行了几何校正,以修正地形变化对数据的影响。
所有 Landsat Level-1 数据产品的生成都采用了针对每个场景最优的处理级别。所采用的处理级别取决于地面控制点的存在情况、各种数字高程模型提供的高程数据,以及航天器和传感器收集的载荷校正数据。请访问 Landsat 处理级别网页,以了解更多关于 Level-1 处理数据质量的信息。
- Landsat Level-2 Data
Landsat Collection 2 Level-2 科学产品是一种时间序列观测数据,其数据长度足够长,且具有连贯性,能够记录土地的变化情况。这些数据被用作 Landsat Level-3 科学产品的输入数据。Landsat Collection 2 Level-1 数据则用于 Level-2 科学产品的处理过程中。
制作二级产品的所需时间因卫星类型而异。Landsat Collection 2 产品生成时间轴展示了每种传感器生成二级产品所需的时间。
产品数据包含:Landsat Surface Reflectance、Landsat Surface Temperature、Landsat Surface Reflectance-Derived Spectral Indices、Provisional Aquatic Reflectance
- Landsat Level-3 Data
Level-3 Data包含Level-3 ARD Tile-based Science Products与Level-3 Scene-based Science Products。
Level-3 ARD Tile-based Science Products由 Landsat Collection 2 Level-3 生成的科学数据,反映了地球表面的生物物理特性。这些数据是基于 Landsat U.S. Analysis Ready Data(ARD)作为输入而生成的。产品数据包含: Dynamic Surface Water Extent、Fractional Snow Covered Area、Burned Area。
Level-3 Scene-based Science Products由 Landsat Level-2 基于场景数据生成的 Landsat Collection 2 Level-3 科学产品。 产品数据包含:Provisional Actual Evapotranspiration。
2.2 数据名称命名格式
Landsat数据名称为Ls0q_xxff_ppprrr_yyyymmdd_YYYYMMDD_cc_CC,
其中各指标为:
| 字符 | 含义 | 可用类型 | 类型介绍 |
|---|---|---|---|
| s | 传感器类型 | C | OLI/TIRS |
| O | 仅OLI传感器 | ||
| T | 仅TIRS传感器 | ||
| E | ETM+传感器 | ||
| TM | TM传感器 | ||
| q | 卫星编号 | 4 | Landsat 4 |
| 5 | Landsat 5 | ||
| 7 | Landsat 7 | ||
| 8 | Landsat 8 | ||
| 9 | Landsat 9 | ||
| xx | 数据处理级别 | L1 | 一级数据 |
| L2 | 二级产品数据 | ||
| ff | 数据校正类型 | TP | 精纠正与地形校正 |
| GT | 系统地形校正 | ||
| GS | 系统校正 | ||
| SP | 地表反射率 | ||
| SR | 地表温度 | ||
| ppp | 轨道号 | ||
| fff | 行编号 | ||
| yyyy | 卫星影像实际拍摄年份 | ||
| mm | 卫星影像实际拍摄月份 | ||
| dd | 卫星影像实际拍摄天数 | ||
| YYYY | 处理生产本产品文件的年份 | ||
| MM | 处理生产本产品文件的月份 | ||
| DD | 处理生产本产品文件的天数 | ||
| cc | 数据集版本 | 01 | Collection 1 |
| 02 | Collection 2(目前主流数据) | ||
| CC | 数据层级类别 | RT | real-time 实时/新传回数据,尚未完全评估 |
| T1 | Tier 1 第一层,辐射和几何质量最佳,可用于时间序列分析 | ||
| T2 | Tire 2 第二层,未达到T1精度标准的数据 |
例如:
- Real-Time: LC08_L1TP_013002_20200629_20200629_01_RT
Landsat 8 OLI/TIRS level-1级精纠正与地形校正数据013轨道002行列,2020年6月29日卫星采集数据,2020年6月29日处理产品数据,数据集版本Collection 1的实时状态数据
- Tier 1: LC08_L1TP_013042_20211225_20211230_02_T1
Landsat 8 OLI/TIRS level-1级精纠正与地形校正数据013轨道042行列,2021年12月25日卫星采集数据,2021年12月30日处理产品数据,数据集版本Collection 2的第一层数据
- Tier 2: LT05_L1GS_178058_19950410_20200912_02_T2
Landsat 5 TM level-1级系统校正数据178轨道058行列,1995年4月10日卫星采集数据,2020年9月12日处理产品数据,数据集版本Collection 2的第二层数据
3. Landsat数据波段信息介绍
Landsat数据波段信息介绍来自于NASA官网。
3.1 Landsat 4-5 Thematic Mapper ( TM )
| Band | Name | wavelength(μm) | GSD(m) |
|---|---|---|---|
| 1 | Blue | 0.45-0.52 | 30 |
| 2 | Green | 0.52-0.60 | 30 |
| 3 | Red | 0.63-0.69 | 30 |
| 4 | Near Infrared(NIR) | 0.76-0.90 | 30 |
| 5 | Shortwave Infrared(SWIR) | 1.55-1.75 | 30 |
| 6 | Thermal Infrared(TIR) | 10.40-12.50 | 120(resampled to 30) |
| 7 | Shortwave Infrared(SWIR) 2 | 2.08-2.35 | 30 |
3.2 Landsat 7 Enhanced Thematic Mapper Plus (ETM+)
| Band | Name | wavelength(μm) | GSD(m) |
|---|---|---|---|
| 1 | Blue | 0.45-0.52 | 30 |
| 2 | Green | 0.52-0.60 | 30 |
| 3 | Red | 0.63-0.69 | 30 |
| 4 | Near Infrared(NIR) | 0.77-0.90 | 30 |
| 5 | Shortwave Infrared(SWIR) | 1.55-1.75 | 30 |
| 6 | Thermal Infrared(TIR) | 10.40-12.50 | 60(resampled to 30) |
| 7 | Shortwave Infrared(SWIR) 2 | 2.09-2.35 | 30 |
| 8 | Panchromatic | 0.52-0.90 | 15 |
3.3 Landsat 8-9 Operational Land Imager (OLI) and Landsat 8-9 Thermal Infrared Sensor (TIRS)
| Band | Name | wavelength(μm) | GSD(m) |
|---|---|---|---|
| 1 | Coastal/Aerosol | 0.45-0.45 | 30 |
| 2 | Blue | 0.45-0.51 | 30 |
| 3 | Green | 0.53-0.59 | 30 |
| 4 | Red | 0.64-0.67 | 30 |
| 5 | Near Infrared(NIR) | 0.85-0.88 | 30 |
| 6 | Shortwave Infrared(SWIR) | 1.57-1.65 | 30 |
| 7 | Shortwave Infrared(SWIR) 2 | 2.11-2.29 | 30 |
| 8 | Panchromatic | 0.50-0.68 | 15 |
| 9 | Cirrus | 1.36-1.38 | 30 |
| 10 | Thermal-infrared (TIR) 1 | 10.6-11.19 | 100 (resampled to 30) |
| 11 | Thermal-infrared (TIR) 2 | 11.50-12.51 | 100 (resampled to 30) |
4. Landsat数据预处理
作者目前编写完成了Landsat数据通用预处理代码,包含辐射校正、数据裁剪、表观反射率计算、6s大气校正。后续会进行几何校正、影像配准、正射校正,影像融合、镶嵌拼接代码编写。云检测、云掩膜代码作者已完成针对Sentinel 2 数据处理的代码,目前尚未与Landsat数据自动化预处理流水线合并,后续时间充足条件下,会进行补充。
4.1 python 代码
importos# 以下为自定义函数fromsrc.Landsat_45789_Getinfoimport*fromsrc.Landsat_45789_radiation_correctionimport*fromsrc.function_clip_imgimport*fromsrc.Landsat_45789_atmospheric_correctionimport*fromsrc.Landsat_45789_top_of_atmosphereimport*fromsrc.Landsat_SP_Atmospheric_correctionimport*if__name__=='__main__':file_path=r'D:\X\X12\data\LC08_L1TP_118039_20131203_20170428_01_T1_MTL.txt'out_dir=r'D:\Test_romote_sensing_preprocessing\results'ifnotos.path.exists(out_dir):os.makedirs(out_dir)Landsat_info=Landsat(file_path)landsat_data=Landsat_info.Read_landsat_mtl()sub_all_file=Landsat_info.Landsat_sub_filepath()if'TP'inPath(file_path).stem:# 辐射校正RC_out_path=os.path.join(out_dir,os.path.basename(file_path).replace('_MTL.txt','_RC.tiff'))radiation_correction_info=radiation_correction(sub_all_file,RC_out_path,Landsat_info)radiation_correction_info.landsat_L1_radiation_correction()# 影像裁剪clip_path=os.path.join(out_dir,os.path.basename(file_path).replace('_MTL.txt','_clip.tiff'))shp_file=r"D:\Test_romote_sensing_preprocessing\data\test2.shp"img_clip_info=img_clip(RC_out_path,clip_path,shp_file)img_clip_info.clip_img()# 表观反射率计算TOA_out_path=os.path.join(out_dir,os.path.basename(file_path).replace('_MTL.txt','_TOA.tiff'))Landsat_top_of_atmosphere_info=Landsat_top_of_atmosphere(clip_path,TOA_out_path)Landsat_top_of_atmosphere_info.landsat_L1_top_of_atmosphere()# 6s大气校正RF_out_path=os.path.join(out_dir,os.path.basename(file_path).replace('_MTL.txt','_reflection.tiff'))atmospheric_correction_info=atmospheric_correction(clip_path,RF_out_path)atmospheric_correction_info.run_in_processes()atmospheric_correction_info.landsat_l1_reflection_correction_6s()elif'SP'inPath(file_path).stem:# SP数据转换为地表反射率RF_out_path=os.path.join(out_dir,os.path.basename(file_path).replace('_MTL.txt','_reflection.tiff'))Landsat_SP_Atmospheric_correction_info=Landsat_SP_Atmospheric_correction(sub_all_file,RF_out_path,Landsat_info)Landsat_SP_Atmospheric_correction_info.landsat_l2_reflection_correction()作者在撰写代码过程中同时进行了3项目标任务,本任务为其中一条,git记录见下图:
4.2 代码运行环境
affine @file:///C:/b/abs_a90_dxt1pi/croot/affine_1756122943225/work attrs @file:///C:/Users/task_177495968374484/croot/attrs_1774959757320/work branca @file:///C:/Users/task_176709362965211/croot/branca_1767093737080/work brotlicffi @file:///C:/Users/task_178644395580478/croot/brotlicffi_1786444045806/work certifi @file:///C:/Users/task_YAR7wApqSDOhN_0/croot/certifi_1785412605974/work/certifi cffi @file:///C:/Users/task_I8-lPzBkTFuTO_0/croot/cffi_1784189022923/work charset-normalizer @file:///C:/Users/task_Rv9ykhKISAWPX_0/croot/charset-normalizer_1782917499282/work click @file:///C:/Users/task_178117615264254/croot/click_1781176564865/work cligj==0.7.2colorama @file:///C:/Users/dev-admin/perseverance-python-buildout/croot/colorama_1729036581634/work contourpy @file:///C:/miniconda3/conda-bld/contourpy_1763643940481/work cycler @file:///C:/Users/task_176606794865467/croot/cycler_1766068048113/work folium @file:///C:/miniconda3/conda-bld/folium_1758749964347/work fonttools @file:///C:/Users/task_178107563774626/croot/fonttools_1781075751167/work GDAL==3.11.4geopandas @file:///C:/Users/task_177444535068699/croot/geopandas-split_1774445941958/work Glymur @file:///home/conda/feedstock_root/build_artifacts/glymur_1778711655224/work idna @file:///C:/Users/task_178056089149060/croot/idna_1780561416383/work imagecodecs @file:///C:/Users/task_177384508606717/croot/imagecodecs_1773845651172/work ImageIO @file:///C:/Users/task_NzSFP26fSr28P_0/croot/imageio_1785928393132/work Jinja2 @file:///C:/b/abs_920kup4e6u/croot/jinja2_1741711580669/work joblib @file:///C:/Users/task_176786735513374/croot/joblib_1767868143118/work kiwisolver @file:///C:/Users/task_DcepMh_KSaegC_0/croot/kiwisolver_1786023437793/work lxml @file:///C:/miniconda3/conda-bld/lxml_1764009763146/work mapclassify @file:///C:/Users/task_177082079643251/croot/mapclassify_1770821147183/work MarkupSafe @file:///C:/Users/task_178239080967659/croot/markupsafe_1782390885847/work matplotlib==3.11.0networkx @file:///C:/miniconda3/conda-bld/networkx_1765378660985/work numpy @file:///C:/Users/task_bGdgkTxJS1C6Y_0/croot/numpy_and_numpy_base_1783953973124/work/dist/numpy-2.5.1-cp313-cp313-win_amd64.whl#sha256=5ca6510ab5a2d06d2c39c14a99956c0d4d418dc17cd19c51010f5cc2e4b93bcapackaging==26.2pandas @file:///C:/Users/task_Q_9KIMcxSmuvv_0/croot/pandas_1785760249434/work pillow @file:///C:/Users/task_177797437579578/croot/pillow_1777974486868/work Py6S @file:///home/conda/feedstock_root/build_artifacts/py6s_1656675897516/work pycparser @file:///C:/Users/task_177495971170849/croot/pycparser_1774959815978/work pyogrio @file:///C:/b/abs_3ccy1t5qd8/croot/pyogrio_1753452344091/work pyparsing @file:///C:/miniconda3/conda-bld/pyparsing_1763974011379/work pypinyin @file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_pypinyin_1753210868/work pyproj @file:///C:/Users/task_176977227278513/croot/pyproj_1769772479311/work PySocks @file:///C:/miniconda3/conda-bld/pysocks_1761753030965/work pysolar @file:///home/conda/feedstock_root/build_artifacts/pysolar_1690646179287/work python-dateutil @file:///C:/Users/dev-admin/perseverance-python-buildout/croot/python-dateutil_1729038406576/work pytz @file:///C:/Users/task_178064946644476/croot/pytz_1780649989323/work rasterio==1.5.0requests @file:///C:/Users/task_178034870374817/croot/requests_1780348781782/work scikit-learn @file:///C:/b/abs_45qemhn4lg/croot/scikit-learn_1753427401078/work scipy @file:///C:/Users/task_178236955215081/croot/scipy_1782369674143/work/dist/scipy-1.18.0-cp313-cp313-win_amd64.whl#sha256=915aaa93924f4f9c23149ee8787e2d3f921dad4bc9d666936653b36a3680261asetuptools==83.0.0shapely @file:///C:/miniconda3/conda-bld/shapely_1764846914659/work six @file:///C:/b/abs_149wuyuo1o/croot/six_1744271521515/work threadpoolctl @file:///C:/miniconda3/conda-bld/threadpoolctl_1764361788000/work tzdata @file:///home/task_177806041933677/croot/python-tzdata_1778060738968/work urllib3 @file:///C:/Users/task_177853590853313/croot/urllib3_1778536214467/work wheel==0.47.0win_inet_pton @file:///C:/miniconda3/conda-bld/win_inet_pton_1761746278300/work xyzservices @file:///C:/Users/task_177678304144328/croot/xyzservices_1776783112314/work4.3 代码运行结果
使用LC08_L1TP_118039_20131203_20170428_01_T1数据进行代码调试,代码生成数据包含辐射校正数据、影像裁剪数据、表观反射率数据、大气校正数据。LC08_L1TP_118039_20131203_20170428_01_T1数据为Landsat 8 OLI/TIRS level-1级精纠正与地形校正 118轨道039行数据,卫星数据采集时间为2013年12月3日,产品数据处理时间为2017年4月28日,数据集为Collection 1的第一层数据。
辐射校正结果
影像裁剪结果
表观反射率计算结果
大气校正结果
4.4 代码计算结果与ENVI处理结果对比
- 辐射校正结果对比
辐射校正结果对比,左—代码计算结果LC08***_RC.tiff,右—ENVI计算结果RC.tiff - 表观反射率结果对比
表观反射率计算结果对比,左—代码计算结果LC08***_TOA.tiff,右—ENVI计算结果 toa.tiff - 大气校正结果对比
大气校正计算结果对比,左—代码6s模型大气校正计算结果LC08***_reflection.tiff,右—ENVI flaash大气校正计算结果 flaash.tiff,右上图为植被像元flaash大气校正后的光谱曲线,右下图为植被像元6s大气校正后的光谱曲线
大气校正计算结果对比,左—代码6s模型大气校正计算结果LC08***_reflection.tiff,右—ENVI flaash大气校正计算结果 flaash.tiff,右上图为水体像元flaash大气校正后的光谱曲线,右下图为水体像元6s大气校正后的光谱曲线
大气校正计算结果对比,左—代码6s模型大气校正计算结果LC08***_reflection.tiff,右—ENVI flaash大气校正计算结果 flaash.tiff,右上图为裸地像元flaash大气校正后的光谱曲线,右下图为裸地像元6s大气校正后的光谱曲线