dawhite / MCTK

The MODIS Conversion Toolkit plugin for ENVI
57 stars 23 forks source link

Attempt to call undefined procedure/function: 'ENVI_QUERY_VERSION'. #19

Closed cyemeng closed 6 years ago

cyemeng commented 6 years ago

I am trying to convert a hdf file to another projection in IDL , the command following is what i write:

`;Level 1A example compile_opt idl2 PRINT, 'START : ',SYSTIME() MODIS_FILE = 'f:\guizhou\data\modis\MYD05_L2.A2016041.0600.006.2016041204845.hdf' OUTPUT_LOCATION = 'f:\guizhou\data\modis\' output_rootname = 'wv_ni' OUTPUT_METHOD = 1 ;0 = Standard, 1 = Projected, 2 = Standard and Projected

GRID_NAME = "Water_Vaper_Near_Infrared" ;投影转换设定 ;差值设置 INTERPOLATION_METHOD = 0 ;0 — Nearest neighbor

CONVERT_MODIS_DATA, IN_FILE=MODIS_FILE, OUT_PATH=OUTPUT_LOCATION, OUT_ROOT=output_rootname $ ,GD_NAME = GRID_NAME $ ,OUT_METHOD=OUTPUT_METHOD $ ,INTERP_METHOD=INTERPOLATION_METHOD $ ;,BACKGROUND='0', FILL_REPLACE_VALUE='0' $ ;/no_msg,$ ,R_FID_ARRAY=R_FID_ARRAY, R_FNAME_ARRAY=R_FNAME_ARRAY, /NO_MSG END`

when I run it, it says

% Compiled module: $MAIN$. START : Sun Dec 17 13:13:02 2017 % Attempt to call undefined procedure/function: 'ENVI_QUERY_VERSION'. % Execution halted at: GET_SAVE_ADD_PATH % CONVERT_MODIS_DATA % $MAIN$ 14 C:\Users\cyeme\IDLWorkspace83\Guizhou\modis_covert_wv.pro

why is that ? I use ENVI 5.1

dawhite commented 6 years ago

ENVI must be running in order to use MCTK. If your command prompt says "IDL>", simply type "ENVI", hit enter, and then run your program. The alternative is to build ENVI batch mode into your program, which is covered in the ENVI documentation: http://www.harrisgeospatial.com/Support/SelfHelpTools/HelpArticles/HelpArticles-Detail/TabId/2718/ArtMID/10220/ArticleID/19657/1797.aspx