sentinel-2 大气校正方法

参考文章:

https://blog.****.net/qq_41718357/article/details/83536322

https://blog.****.net/qq_41718357/article/details/89023618

https://blog.****.net/sinat_28853941/article/details/78511167


sen2cor下载地址:     http://step.esa.int/main/third-party-plugins-2/sen2cor/

Two different versions of Sen2Cor are available:

Sen2Cor_v2.8 is the latest release supporting Sentinel-2 L1C data generated with the current (14.5) and previous (14.2) Products Specification Document, as input. Sen2Cor_v2.8 release contains new features and improvements respect to Sen2Cor_v2.5.5.

Sen2Cor_v2.5.5 is the previous release and it is needed if the user intends to process old Sentinel-2 L1C data generated with the Products Specification Document older than 14.2 and not reprocessed by ESA.

下载zip,解压后进入文件夹,如图。按shift同时右键选择在此处进入命令行。

sentinel-2 大气校正方法

输入L2A_Process.bat –help,得到如下图所示结果即为成功。下一步即可进行大气校正

Microsoft Windows [版本 10.0.14393]
(c) 2016 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd Sen2Cor-02.08.00-win64
C:\Users\Administrator\Sen2Cor-02.08.00-win64>L2A_Process --help
usage: L2A_Process.py [-h] [--mode MODE] [--resolution {10,20,60}]
                      [--datastrip DATASTRIP] [--tile TILE]
                      [--output_dir OUTPUT_DIR] [--work_dir WORK_DIR]
                      [--img_database_dir IMG_DATABASE_DIR]
                      [--res_database_dir RES_DATABASE_DIR]
                      [--processing_centre PROCESSING_CENTRE]
                      [--archiving_centre ARCHIVING_CENTRE]
                      [--processing_baseline PROCESSING_BASELINE] [--raw]
                      [--tif] [--sc_only] [--cr_only] [--debug]
                      [--GIP_L2A GIP_L2A] [--GIP_L2A_SC GIP_L2A_SC]
                      [--GIP_L2A_AC GIP_L2A_AC] [--GIP_L2A_PB GIP_L2A_PB]
                      input_dir

Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.8.0, created: 2019.02.20,
supporting Level-1C product version 14.2 - 14.5.

positional arguments:
  input_dir             Directory of Level-1C input

optional arguments:
  -h, --help            show this help message and exit
  --mode MODE           Mode: generate_datastrip, process_tile
  --resolution {10,20,60}
                        Target resolution, can be 10, 20 or 60m. If omitted,
                        only 20 and 10m resolutions will be processed
  --datastrip DATASTRIP
                        Datastrip folder
  --tile TILE           Tile folder
  --output_dir OUTPUT_DIR
                        Output directory
  --work_dir WORK_DIR   Work directory
  --img_database_dir IMG_DATABASE_DIR
                        Database directory for L1C input images
  --res_database_dir RES_DATABASE_DIR
                        Database directory for results and temporary products
  --processing_centre PROCESSING_CENTRE
                        Processing centre as regex: ^[A-Z_]{4}$, e.g "SGS_"
  --archiving_centre ARCHIVING_CENTRE
                        Archiving centre as regex: ^[A-Z_]{4}$, e.g. "SGS_"
  --processing_baseline PROCESSING_BASELINE
                        Processing baseline in the format: "dd.dd", where
                        d=[0:9]
  --raw                 Export raw images in rawl format with ENVI hdr
  --tif                 Export raw images in TIFF format instead of JPEG-2000
  --sc_only             Performs only the scene classification at 60 or 20m
                        resolution
  --cr_only             Performs only the creation of the L2A product tree, no
                        processing
  --debug               Performs in debug mode
  --GIP_L2A GIP_L2A     Select the user GIPP
  --GIP_L2A_SC GIP_L2A_SC
                        Select the scene classification GIPP
  --GIP_L2A_AC GIP_L2A_AC
                        Select the atmospheric correction GIPP
  --GIP_L2A_PB GIP_L2A_PB
                        Select the processing baseline GIPP

大气校正 步骤如下:
对10m的数据进行大气校正,进入数据所在文件夹下,键入命令:
C:\Users\Administrator\Sen2Cor-02.08.00-win64>L2A_Process.bat  --resolution 10 C:\Users\Administrator\Sen2Cor-02.08.00-win64\S2A_MSIL1C_20191005T030601_N0208_R075_T49RFL_20191005T060401\S2A_MSIL1C_20191005T030601_N0208_R075_T49RFL_20191005T060401.SAFE 

对所有数据进行大气校正,命令如下:
C:\Users\Administrator\Sen2Cor-02.08.00-win64>L2A_Process C:\Users\Administrator\Sen2Cor-02.08.00-win64\S2A_MSIL1C_20191005T030601_N0208_R075_T49RFL_20191005T060401\S2A_MSIL1C_20191005T030601_N0208_R075_T49RFL_20191005T060401.SAFE
Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.8.0, created: 2019.02.20, supporting Level-1C product version 14.2 - 14.5 started ...
Product version: 14.5
Operation mode: TOOLBOX
Processing baseline: 99.99
Progress[%]:  0.00 : Generating datastrip metadata
L1C datastrip found, L2A datastrip successfully generated
No resolution specified, will process 20 and 10 m resolution
20 m resolution will be downsampled to 60 m
Progress[%]: 0.09 : PID-11104, L2A_ProcessTile: processing with resolution 20 m, elapsed time[s]: 2.353, total: 0:00:08.932000
Progress[%]: 0.09 : PID-11104, L2A_ProcessTile: start of pre processing, elapsed time[s]: 0.001, total: 0:00:08.933000
Progress[%]: 0.09 : PID-11104, L2A_Tables: start import, elapsed time[s]: 0.044, total: 0:00:08.977000
Progress[%]: 0.11 : PID-11104, L2A_Tables: band B01 imported, elapsed time[s]: 0.281, total: 0:00:09.258000
Progress[%]: 0.27 : PID-11104, L2A_Tables: band B02 imported, elapsed time[s]: 4.137, total: 0:00:13.395000
Progress[%]: 0.46 : PID-11104, L2A_Tables: band B03 imported, elapsed time[s]: 4.832, total: 0:00:18.227000
Progress[%]: 0.66 : PID-11104, L2A_Tables: band B04 imported, elapsed time[s]: 5.062, total: 0:00:23.289000
Progress[%]: 0.79 : PID-11104, L2A_Tables: band B05 imported, elapsed time[s]: 3.494, total: 0:00:26.783000
Progress[%]: 0.87 : PID-11104, L2A_Tables: band B06 imported, elapsed time[s]: 1.903, total: 0:00:28.686000
Progress[%]: 0.94 : PID-11104, L2A_Tables: band B07 imported, elapsed time[s]: 1.940, total: 0:00:30.626000
Progress[%]: 1.02 : PID-11104, L2A_Tables: band B8A imported, elapsed time[s]: 1.908, total: 0:00:32.534000
C:\Users\Administrator\Sen2Cor-02.08.00-win64>

 

大气校正后:

大气校正之后可在SNAP进行后续的应用,当然也可以在SNAP里针对特定波段进行导出成tif格式,在其他平台例如erdas、envi中进行操作。

SNAP下载:http://step.esa.int/main/download/

Windows 64-Bit Windows 32-Bit Mac OS X Unix 64-bit
Sentinel Toolboxes These installers contain the Sentinel-1Sentinel-2Sentinel-3Toolboxes
Download Download Download Download
SMOS Toolbox These installer contains only the SMOS Toolbox.
Download also the Format Conversion Tool (Earth Explorer to NetCDF) and the user manual.
Download Download Download Download
All Toolboxes These installers contain the Sentinel-1Sentinel-2Sentinel-3Toolboxes, SMOS and PROBA-V Toolbox
Download Download Download Download

安装该软件,打开页面如下:

sentinel-2 大气校正方法

 

安装后可以在SNAP中将数据转为ENVI等格式输出,操作流程为打开SNAP,点击file-open product,选择需要转格式输出的数据.safe文件,选择MTD开头的.xml文件。

打开后不能直接用file-export-ENVI进行转换,这样做会弹出错误信息:

sentinel-2 大气校正方法

应当首先进行resampling。点击raster- geometric operations- resampling,选择resampling parameters,调节参数,点击run。

sentinel-2 大气校正方法

完成后SNAP左侧会出现操作完成后的结果。选中它再点击file - export- ENVI即可完成。转出后的格式可以用ENVI打开。