将Global AVHRR NDVI 3g转换为ESRI ASCII Grid栅格的Matlab代码

我在前面的帖子(previous post)介绍了用ArcGIS读取GIMMS AVHRR NDVI 3g格式的数据文件的方法,但并不十分好用。所以写了一点代码,用于方便的将之转换为ESRI ASCII Grid栅格,后者可以很容易的被GIS软件支持。

从这个帖子可以下载到相关的代码和样例ndvi3g数据。

注意运行代码需要 Matlab的支持。

Purpose: Convert GIMMS Global AVHRR NDVI 3g files to ESRI ASCII Grid, which is very easy to be accessed with popular GIS software.
Author: Zhuotong Nan ([email protected])
Web: http://nanzt.info
Date: Sep 11,2014

Last update: Nov 3,2014

Please distribute codes with this header attached.

Usage:

type convert_ndvi3g_ascii in Matlab to run

Open convert_ndvi3g_ascii.m, modify the ndvi3gfl variable to make it point to the ndvi 3g file you wanto to convert.

After run, three grid files will be created. One is the grid
corresponding to the 3g data file, the other is the ndvi grid extracted from the 3g data file, and the last one is its associated flag grid.

Files included with this code:

  • convert_ndvi3g_ascii.m, the main matlab script
  • geo82dec15a.n07-VI3g, example avhrr ndvi 3g file
  • geo82dec15a.n07-VI3g.asc, ascii grid file corresponding to geo82dec15a.n07-VI3g
  • geo82dec15a.n07-VI3g.ndvi.asc, ascii grid file of the extracted ndvi
  • geo82dec15a.n07-VI3g.flag.asc, grid file of associated flags
  • header.txt, esri grid header information, used in code
  • Readme.txt, this file.

The meaning of the FLAG:
FLAG = 7 (missing data)
FLAG = 6 (NDVI retrieved from average seasonal profile, possibly snow)
FLAG = 5 (NDVI retrieved from average seasonal profile)
FLAG = 4 (NDVI retrieved from spline interpolation, possibly snow)
FLAG = 3 (NDVI retrieved from spline interpolation)
FLAG = 2 (Good value)
FLAG = 1 (Good value)

Nov 3, 2014
Fix bugs that wrongly computing ndvi.asc and flag.asc

Sep 11, 2014
Initial version

Download codes (9,875KB); Link2 (Baidu)

78ae077b84d7455913382971da7731ef  soft.ndvi3g.11032014.zip

Download codes (6,483KB)

MD5:  006d2d630a5c94f3ca629fc9f751d7f1  soft.ndvi3g.zip

7 thoughts on “将Global AVHRR NDVI 3g转换为ESRI ASCII Grid栅格的Matlab代码

  1. TANA

    您好
    按您这么处理后的数据是georeferenced了吗?您能附上一个已经几何(带有经纬坐标)纠正好的头文件吗?

    Reply

Leave a Reply to xanthe Cancel reply

Your email address will not be published. Required fields are marked *