MODIS数据几何校正(IDL)


使用IDL对MODIS L1B数据进行几何校正。


1 下载mctk.sav文件

mctk工具非常便利地将原始HDF文件数据集分条目在列表中显示,打开hdf文件后,选择相应的数据集和投影方式,即可生成具有坐标投影信息的MODIS数据文件。点击mctk.sav工具下载mctk.sav文件。


2 配置mctk.sav文件

将mctk.sav拷贝至…\Exelis\ENVI51\extensions文件夹下面,运行ENVI5.1,点击主界面的Extensions文件夹,如果显示mctk则配置成功。

在这里插入图片描述


3 使用IDL进行校正

IDL代码如下:

Level 1B example
forward_function envi_proj_create
forward_function mctk_create_bridges
pro test_batch_modis_conversion_level_1b
  compile_opt IDL2
  
  t1=systime(1) ;获取程序开始运行的系统时间
  print, 'begin...'
  
  modis_l1b_file = 'E:\MOD03\MOD021KM.A2017244.0735.006.2017244214951.hdf'
  
  output_location = 'E:\MOD03-out\'

  output_rootname = 'level_1b'
  
  ;Calibration method schema is:
  ;0 = Radiance / Emissivity, 1 = Reflectance / Emissivity, 2 = Radiance / Brightness Temp
  calib_method = 1

  ;Output method schema is:
  ;0 = Standard, 1 = Projected, 2 = Standard and Projected
  out_method = 1
  
  output_projection = envi_proj_create(/geographic)
  ;output_projection = envi_proj_create(/geographic, datum='WGS-84')
  
  ;do not put the bridge creation/destruction code inside a loop
  bridges = mctk_create_bridges()

  ;Choosing linear interpolation
  interpolation_method = 0

  convert_modis_data, in_file = modis_l1b_file, out_path = output_location, $
    out_root = output_rootname, out_method = out_method, $
    interp_method = interpolation_method, $
    out_proj = output_projection, calib_method = calib_method, $
    sd_pos = [0, 1, 2, 3], /no_msg, background = 0.0, r_fid_array = r_fid_array, $
    r_fname_array = r_fname_array, bridges = bridges, msg = msg  
      
  mctk_destroy_bridges, bridges
  
  t2=systime(1)
  print,'耗时(min):',(t2-t1)/60.0

end

最后结果如下,左图为校正前的影像,右图为校正后的影像。

在这里插入图片描述
欢迎大家批评指正。

  • 4
    点赞
  • 31
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

A-Chin

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值