专业遥感大气校正处理工具
简介
基于NASA 6S算法与DOS暗目标法的遥感影像大气校正技能,支持Landsat 8/Sentinel-2卫星数据,离线生成标准地表反射率产品,服务于遥感科研与定量反演。
原始描述
对多光谱影像执行 DOS/简化6S 大气校正,将 DN/TOA 转为地表反射率。DOS/simplified-6S atmospheric correction converting DN/TOA to surface reflectance. 支持 Landsat 8/Sentinel-2 传感器元数据,输出地表反射率 GeoTIFF + 校正参数 JSON。
通过你的 Agent 添加
安装目录:geoskill-atmospheric-correction/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
本技能为遥感影像大气校正专业工具,主要功能是将多光谱卫星影像的数字量化值(DN)或大气顶层反射率(TOA)转换为地表反射率(Surface Reflectance)。用户可通过命令行接口选择两种校正算法:DOS(Dark Object Subtraction) 适用于快速预处理场景,通过低分位数像元估计大气路径辐射并扣除;6s-simplified(简化6S辐射传输) 则在DOS基础上增加波长相关的瑞利散射光学厚度校正,更精确模拟蓝光至红光的散射差异。工具内置Landsat 8、Sentinel-2及通用传感器的完整波段元数据(中心波长、太阳大气外辐照度ESUN),支持真实影像处理与--synthetic合成数据模拟模式,后者可在无网络环境下生成物理一致的测试数据用于算法验证。
显著优点
算法权威性:依托USGS Collection 2与ESA官方开放的卫星数据源,ESUN参数引用Chander et al. 2009等经典文献,确保辐射定标基准的国际认可度。离线隐私保障:完全本地化计算,无网络依赖,敏感地理数据不上传云端,符合科研数据安全合规要求。工程友好性:输出标准化GeoTIFF(EPSG:4326)与JSON参数文件,便于接入GDAL、QGIS、Google Earth Engine等后续处理链条。--synthetic模式支持零样本开发测试,降低真实数据获取门槛。参数透明可审计:correction_params.json完整记录逐波段暗目标DN、ρ_dark、ESUN等中间参数,满足遥感产品质量追溯需求。
潜在缺点与局限性
简化6S非完整辐射传输:当前实现仅含瑞利散射项,未纳入气溶胶散射、水汽吸收、臭氧吸收等关键大气参数,高光学厚度或污染地区精度受限。传感器覆盖有限:仅预置Landsat 8/9与Sentinel-2元数据,MODIS、Planet、高分系列等国产卫星需手动配置通用传感器参数。无交互式质量检查:缺乏可视化云检测、水体掩膜、异常值标记等QA/QC功能,用户需自行判断校正结果合理性。合成数据物理简化:模拟影像假设朗伯地表与标准大气,真实场景的BRDF效应、地形阴影、邻域效应未建模。
适合的目标群体
遥感科研用户:从事植被指数时序分析、地表温度反演、生态参数定量估算的研究生与科研人员。GIS数据预处理工程师:需要批量生产标准地表反射率产品以支撑土地利用分类、变化检测项目的遥感数据处理人员。教育培训机构:遥感原理课程中用于演示大气辐射传输机制、对比不同校正算法差异的教学辅助工具。农业/环保部门分析师:基于开放卫星数据进行作物长势监测、水体富营养化评估等业务的基层技术岗位。
常规使用风险
计算性能:大区域多波段影像(如Sentinel-2 L1C 100km×100km)numpy-rasterio全内存处理可能引发内存溢出,建议分块处理或降采样测试。依赖项版本:rasterio与GDAL底层绑定,跨平台(Windows/macOS/Linux)环境配置可能存在驱动冲突,建议使用conda-forge预编译包。辐射定标前置:输入若为原始DN值,用户需确保已完成传感器定标至TOA反射率或辐亮度的预处理步骤,否则校正基准错误。太阳角度参数:未指定solar-zenith时工具使用固定默认值,高纬度冬季或大时间跨度时序分析需手动输入精确几何参数以避免系统偏差。合成数据误用风险:--synthetic模式输出仅供算法验证,直接用于科研发表需声明数据性质。
技能正文
name: geoskill-atmospheric-correction
description: '对多光谱影像执行 DOS/简化6S 大气校正,将 DN/TOA 转为地表反射率。DOS/simplified-6S atmospheric correction converting DN/TOA to surface reflectance. 支持 Landsat 8/Sentinel-2 传感器元数据,输出地表反射率 GeoTIFF + 校正参数 JSON。'
大气校正 | Atmospheric Correction
Performs atmospheric correction on multispectral remote sensing imagery, converting the DN values recorded by the sensor or top-of-atmosphere (TOA) reflectance into surface reflectance. Two methods are implemented:
- DOS (Dark Object Subtraction): estimates per-band atmospheric path radiance from a low percentile DN and subtracts it from TOA reflectance. Suitable for fast preprocessing and temporal radiometric consistency.
- 6s-simplified (simplified 6S radiative transfer): extends DOS with a wavelength-dependent Rayleigh scattering optical thickness correction (strong in blue, weak in red), approximating the atmospheric path radiance behavior of 6S.
Built-in band metadata for Landsat 8, Sentinel-2 and a generic sensor (central wavelength, exo-atmospheric solar irradiance ESUN). The --synthetic mode generates physically consistent simulated imagery, allowing the pipeline to be validated without network access or real data.
Dependencies / 依赖
pip install numpy rasterio
Usage / 使用方法
Basic Usage (Synthetic Data, Offline)
python geoskill-atmospheric-correction.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./output
示例 1:Landsat 8 DOS 校正(合成数据)
pip install numpy rasterio
Basic Usage (Synthetic Data, Offline)
python geoskill-atmospheric-correction.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./output
python geoskill-atmospheric-correction.py \
--bbox 116.0 39.0 117.0 40.0 \
--synthetic \
--sensor landsat8 \
--method dos \
--output-dir ./landsat8_dos
示例 2:Sentinel-2 简化 6S 校正
python geoskill-atmospheric-correction.py \
--bbox 121.0 31.0 122.0 32.0 \
--synthetic \
--sensor sentinel2 \
--method 6s-simplified \
--output-dir ./s2_6s
示例 3:真实影像 DOS 校正
python geoskill-atmospheric-correction.py \
--input scene_dn.tif \
--sensor landsat8 \
--method dos \
--dark-percentile 0.5 \
--output-dir ./real_dos
Example 4: Custom Solar Zenith Angle
python geoskill-atmospheric-correction.py \
--input scene.tif \
--sensor sentinel2 \
--solar-zenith 45.0 \
--output-dir ./custom_angle
示例 5:批量参数对比(DOS vs 6s)
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method dos --output-dir ./cmp_dos --quiet
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method 6s-simplified --output-dir ./cmp_6s --quiet
Output / 输出
File
Format
Description
surface_reflectance.tif
GeoTIFF (float32)
Surface reflectance, per-band [0,1], EPSG:4326
correction_params.json
JSON
Per-band correction parameters (dark target DN, ρ_dark, ESUN, etc.)
output-manifest.json
JSON
Run manifest (inputs/outputs/QA/software versions)
Data Source / 数据源 / Source
- Landsat 8/9: USGS Collection 2 (public domain); ESUN from Chander et al. 2009
- Sentinel-2: ESA (open data policy); ESUN from ESA S2 documentation
- Synthetic mode: generated locally, no external data sources
Privacy / 隐私声明 / Privacy
- Fully offline by default; no network requests are made
--synthetic mode reads no external data
- All computation is done locally; user data is never uploaded
- Nominatim may only be accessed when using place-name resolution (not a direct feature of this skill)
License / License
python geoskill-atmospheric-correction.py \
--bbox 121.0 31.0 122.0 32.0 \
--synthetic \
--sensor sentinel2 \
--method 6s-simplified \
--output-dir ./s2_6s
python geoskill-atmospheric-correction.py \
--input scene_dn.tif \
--sensor landsat8 \
--method dos \
--dark-percentile 0.5 \
--output-dir ./real_dos
Example 4: Custom Solar Zenith Angle
python geoskill-atmospheric-correction.py \
--input scene.tif \
--sensor sentinel2 \
--solar-zenith 45.0 \
--output-dir ./custom_angle
示例 5:批量参数对比(DOS vs 6s)
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method dos --output-dir ./cmp_dos --quiet
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method 6s-simplified --output-dir ./cmp_6s --quiet
Output / 输出
File
Format
Description
surface_reflectance.tif
GeoTIFF (float32)
Surface reflectance, per-band [0,1], EPSG:4326
correction_params.json
JSON
Per-band correction parameters (dark target DN, ρ_dark, ESUN, etc.)
output-manifest.json
JSON
Run manifest (inputs/outputs/QA/software versions)
Data Source / 数据源 / Source
- Landsat 8/9: USGS Collection 2 (public domain); ESUN from Chander et al. 2009
- Sentinel-2: ESA (open data policy); ESUN from ESA S2 documentation
- Synthetic mode: generated locally, no external data sources
Privacy / 隐私声明 / Privacy
- Fully offline by default; no network requests are made
--synthetic mode reads no external data
- All computation is done locally; user data is never uploaded
- Nominatim may only be accessed when using place-name resolution (not a direct feature of this skill)
License / License
python geoskill-atmospheric-correction.py \
--input scene.tif \
--sensor sentinel2 \
--solar-zenith 45.0 \
--output-dir ./custom_angle
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method dos --output-dir ./cmp_dos --quiet
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method 6s-simplified --output-dir ./cmp_6s --quiet
Output / 输出
File
Format
Description
surface_reflectance.tif
GeoTIFF (float32)
Surface reflectance, per-band [0,1], EPSG:4326
correction_params.json
JSON
Per-band correction parameters (dark target DN, ρ_dark, ESUN, etc.)
output-manifest.json
JSON
Run manifest (inputs/outputs/QA/software versions)
Data Source / 数据源 / Source
- Landsat 8/9: USGS Collection 2 (public domain); ESUN from Chander et al. 2009
- Sentinel-2: ESA (open data policy); ESUN from ESA S2 documentation
- Synthetic mode: generated locally, no external data sources
Privacy / 隐私声明 / Privacy
- Fully offline by default; no network requests are made
--synthetic mode reads no external data
- All computation is done locally; user data is never uploaded
- Nominatim may only be accessed when using place-name resolution (not a direct feature of this skill)
License / License
| File | Format | Description |
|---|---|---|
surface_reflectance.tif |
GeoTIFF (float32) | Surface reflectance, per-band [0,1], EPSG:4326 |
correction_params.json |
JSON | Per-band correction parameters (dark target DN, ρ_dark, ESUN, etc.) |
output-manifest.json |
JSON | Run manifest (inputs/outputs/QA/software versions) |
- Landsat 8/9: USGS Collection 2 (public domain); ESUN from Chander et al. 2009
- Sentinel-2: ESA (open data policy); ESUN from ESA S2 documentation
- Synthetic mode: generated locally, no external data sources
Privacy / 隐私声明 / Privacy
- Fully offline by default; no network requests are made
--synthetic mode reads no external data
- All computation is done locally; user data is never uploaded
- Nominatim may only be accessed when using place-name resolution (not a direct feature of this skill)
License / License
--synthetic mode reads no external dataMIT
name: geoskill-atmospheric-correction
description: '对多光谱影像执行 DOS/简化6S 大气校正,将 DN/TOA 转为地表反射率。DOS/simplified-6S atmospheric correction converting DN/TOA to surface reflectance. 支持 Landsat 8/Sentinel-2 传感器元数据,输出地表反射率 GeoTIFF + 校正参数 JSON。'
大气校正 | Atmospheric Correction
对多光谱遥感影像执行大气校正,将传感器记录的 DN 值或大气顶(TOA)反射率 转换为地表反射率(surface reflectance)。实现了两种方法:
- DOS(Dark Object Subtraction,暗目标扣除):逐波段用低分位数 DN 估计 大气路径辐射,从 TOA 反射率中扣除。适用于快速预处理和时序辐射一致性。
- 6s-simplified(简化 6S 辐射传输):在 DOS 基础上追加随波长变化的瑞利 散射光学厚度改正(蓝光强、红光弱),近似 6S 的大气程辐射行为。
内置 Landsat 8、Sentinel-2 和通用传感器的波段元数据(中心波长、太阳大气外
辐照度 ESUN)。支持 --synthetic 模式生成物理一致的模拟影像,无需网络和
真实数据即可验证流程。
依赖
pip install numpy rasterio
使用方法
基本用法(合成数据,离线)
python geoskill-atmospheric-correction.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./output
示例 1:Landsat 8 DOS 校正(合成数据)
pip install numpy rasterio
基本用法(合成数据,离线)
python geoskill-atmospheric-correction.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./output
python geoskill-atmospheric-correction.py \
--bbox 116.0 39.0 117.0 40.0 \
--synthetic \
--sensor landsat8 \
--method dos \
--output-dir ./landsat8_dos
示例 2:Sentinel-2 简化 6S 校正
python geoskill-atmospheric-correction.py \
--bbox 121.0 31.0 122.0 32.0 \
--synthetic \
--sensor sentinel2 \
--method 6s-simplified \
--output-dir ./s2_6s
示例 3:真实影像 DOS 校正
python geoskill-atmospheric-correction.py \
--input scene_dn.tif \
--sensor landsat8 \
--method dos \
--dark-percentile 0.5 \
--output-dir ./real_dos
示例 4:自定义太阳天顶角
python geoskill-atmospheric-correction.py \
--input scene.tif \
--sensor sentinel2 \
--solar-zenith 45.0 \
--output-dir ./custom_angle
示例 5:批量参数对比(DOS vs 6s)
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method dos --output-dir ./cmp_dos --quiet
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method 6s-simplified --output-dir ./cmp_6s --quiet
输出
文件
格式
说明
surface_reflectance.tif
GeoTIFF (float32)
地表反射率,逐波段 [0,1],EPSG:4326
correction_params.json
JSON
逐波段校正参数(暗目标 DN、ρ_dark、ESUN 等)
output-manifest.json
JSON
运行清单(输入/输出/QA/软件版本)
数据源 / Source
- Landsat 8/9:USGS Collection 2(公共领域),ESUN 取自 Chander et al. 2009
- Sentinel-2:ESA(开放数据政策),ESUN 取自 ESA S2 文档
- 合成模式:本地生成,无外部数据源
隐私声明 / Privacy
- 默认完全离线运行,不发起任何网络请求
--synthetic 模式不读取任何外部数据
- 所有计算在本地完成,不上传用户数据
- 仅当使用地名解析(非本 skill 直接功能)时才可能访问 Nominatim
License
python geoskill-atmospheric-correction.py \
--bbox 121.0 31.0 122.0 32.0 \
--synthetic \
--sensor sentinel2 \
--method 6s-simplified \
--output-dir ./s2_6s
python geoskill-atmospheric-correction.py \
--input scene_dn.tif \
--sensor landsat8 \
--method dos \
--dark-percentile 0.5 \
--output-dir ./real_dos
示例 4:自定义太阳天顶角
python geoskill-atmospheric-correction.py \
--input scene.tif \
--sensor sentinel2 \
--solar-zenith 45.0 \
--output-dir ./custom_angle
示例 5:批量参数对比(DOS vs 6s)
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method dos --output-dir ./cmp_dos --quiet
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method 6s-simplified --output-dir ./cmp_6s --quiet
输出
文件
格式
说明
surface_reflectance.tif
GeoTIFF (float32)
地表反射率,逐波段 [0,1],EPSG:4326
correction_params.json
JSON
逐波段校正参数(暗目标 DN、ρ_dark、ESUN 等)
output-manifest.json
JSON
运行清单(输入/输出/QA/软件版本)
数据源 / Source
- Landsat 8/9:USGS Collection 2(公共领域),ESUN 取自 Chander et al. 2009
- Sentinel-2:ESA(开放数据政策),ESUN 取自 ESA S2 文档
- 合成模式:本地生成,无外部数据源
隐私声明 / Privacy
- 默认完全离线运行,不发起任何网络请求
--synthetic 模式不读取任何外部数据
- 所有计算在本地完成,不上传用户数据
- 仅当使用地名解析(非本 skill 直接功能)时才可能访问 Nominatim
License
python geoskill-atmospheric-correction.py \
--input scene.tif \
--sensor sentinel2 \
--solar-zenith 45.0 \
--output-dir ./custom_angle
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method dos --output-dir ./cmp_dos --quiet
python geoskill-atmospheric-correction.py --bbox 116 39 117 40 --synthetic --sensor landsat8 --method 6s-simplified --output-dir ./cmp_6s --quiet
输出
文件
格式
说明
surface_reflectance.tif
GeoTIFF (float32)
地表反射率,逐波段 [0,1],EPSG:4326
correction_params.json
JSON
逐波段校正参数(暗目标 DN、ρ_dark、ESUN 等)
output-manifest.json
JSON
运行清单(输入/输出/QA/软件版本)
数据源 / Source
- Landsat 8/9:USGS Collection 2(公共领域),ESUN 取自 Chander et al. 2009
- Sentinel-2:ESA(开放数据政策),ESUN 取自 ESA S2 文档
- 合成模式:本地生成,无外部数据源
隐私声明 / Privacy
- 默认完全离线运行,不发起任何网络请求
--synthetic 模式不读取任何外部数据
- 所有计算在本地完成,不上传用户数据
- 仅当使用地名解析(非本 skill 直接功能)时才可能访问 Nominatim
License
| 文件 | 格式 | 说明 |
|---|---|---|
surface_reflectance.tif |
GeoTIFF (float32) | 地表反射率,逐波段 [0,1],EPSG:4326 |
correction_params.json |
JSON | 逐波段校正参数(暗目标 DN、ρ_dark、ESUN 等) |
output-manifest.json |
JSON | 运行清单(输入/输出/QA/软件版本) |
- Landsat 8/9:USGS Collection 2(公共领域),ESUN 取自 Chander et al. 2009
- Sentinel-2:ESA(开放数据政策),ESUN 取自 ESA S2 文档
- 合成模式:本地生成,无外部数据源
隐私声明 / Privacy
- 默认完全离线运行,不发起任何网络请求
--synthetic 模式不读取任何外部数据
- 所有计算在本地完成,不上传用户数据
- 仅当使用地名解析(非本 skill 直接功能)时才可能访问 Nominatim
License
--synthetic 模式不读取任何外部数据MIT
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。