-
Notifications
You must be signed in to change notification settings - Fork 9
/
mod09ga_angle.pro
47 lines (40 loc) · 1.84 KB
/
mod09ga_angle.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
;MOD09GA 太阳天顶角、观测天顶角、相对方位角提取
;shaodonghang
PRO MOD09GA_ANGLE
COMPILE_OPT IDL2
ENVI, /RESTORE_BASE_SAVE_FILES
ENVI_BATCH_INIT, LOG_FILE='BATCH.LOG'
PRINT, 'START : ',SYSTIME()
ROOT_DIR = 'E:\MOD09GA\MOD09GA_pro\'
FNS = FILE_SEARCH(ROOT_DIR,'*.HDF',COUNT = COUNT)
PRINT, 'There ara totally', COUNT,' images.'
OUTPUT_LOCATION = 'E:\MOD09GA\MOD09GA_angle\' ;路径根据数据存储位置修改
GRID_NAME = 'MODIS_Grid_1km_2D'
SD_NAMES = ['SolarZenith_1','SensorZenith_1','SolarAzimuth_1','SensorAzimuth_1'] ;提取数据类型
;OUTPUT_METHOD = 1 ;REPROJECTED
OUTPUT_METHOD = 0 ;Standard
;投影转换设定
UNITS = ENVI_TRANSLATE_PROJECTION_UNITS('Meters')
OUTPUT_PROJECTION = ENVI_PROJ_CREATE(/UTM,ZONE=47,UNITS=UNITS)
OUTPUT_PS_X = 1000
OUTPUT_PS_Y = 1000
INTERPOLATION_METHOD = 8 ;TRIANGULATION WITH NEAREST NEIGHBOR
;调用MTCK
FOR i = 0, COUNT-1 DO BEGIN
FILENAME = FNS[i]
A = STRPOS(FILENAME,'.')
;OUTPUT_ROOT_NAME = 'NIR_'+ STRMID(FILENAME,A+1,8)STRMID(filename,0,23)(FILENAME,A+1,8)
OUTPUT_ROOT_NAME = STRMID(FILENAME,A+1,8)+'_angle'
CONVERT_MODIS_DATA, IN_FILE = FILENAME, $
OUT_PATH = OUTPUT_LOCATION, OUT_ROOT=OUTPUT_ROOT_NAME, $
/HIGHER_PRODUCT, /GRID, GD_NAME=GRID_NAME,SD_NAMES = SD_NAMES, $
OUT_METHOD = OUTPUT_METHOD, OUT_PROJ = OUTPUT_PROJECTION, $
OUT_PS_X = OUTPUT_PS_X, OUT_PS_Y = OUTPUT_PS_Y, $
NUM_X_PTS = 50, $
NUM_Y_PTS=50, $;INTERP_METHOD = INTERPOLATION_METHOD, $
BACKGROUND='0', FILL_REPLACE_VALUE='0',$
R_FID_ARRAY=R_FID_ARRAY, R_FNAME_ARRAY=R_FNAME_ARRAY, /NO_MSG
ENDFOR
PRINT, 'END : ', SYSTIME()
ENVI_BATCH_EXIT
END