comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » MODIS Conversion ToolKit is not working? Can anyone help me?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
MODIS Conversion ToolKit is not working? Can anyone help me? [message #92594] Tue, 19 January 2016 16:29 Go to next message
Harry Kim is currently offline  Harry Kim
Messages: 16
Registered: April 2010
Junior Member
I am working on mosaicking 4 MODIS tiles, and trying to use MODIS Conversion Tool Kit.

However, I faced a problem. After I downloaded MCTK from this site,

https://github.com/dawhite/ENVIPlugins


I placed "mctk.sav" and "modis_products.scsv" files in my save_add folder. the location is:

Windows: c:\program files\exelis\envi52\classic\save_add


Now, I found "% Restored file: MCTK" when I began ENVI classic. I think my IDL-ENVI recognizes those two files. However, The color of 'convert_modis_data' is still black, not yet changed to green as shown in user's guide.

Can anyone give me any solutions?

Please take a look at the attached file, and let me know what to do.

Thank you, in advance!

Harry from Korea

------------------------------------------
pro Mosaic_011916

; Path designation
input_path = 'G:\test_mosaic\' ; add more details.

for date=0,4 do begin

;print,'Processing MODIS images of DOY',date
dir=input_path
cd,dir
files=FILE_SEARCH('MOD11A1*'+strtrim(string(date,format='(I0 3)'), 2)+'.h*.hdf',count=num_inputfiles)
;print,numfiles

output_path = 'G:\test_mosaic\Mosaic\'
;MODIS grid file

format='MOD11A1.A2007001.h28v05.005.2008135100357.hdf'
;START IMPORTING MODIS LAYERS
for i=0,num_inputfiles-1 do begin
grid_file=files[i]
output_rootname = 'Landinputs_'+strtrim((strmid(grid_file,9,7)+'_'+strmid(grid _file,17,6)),2)+'_'
year=strmid(grid_file,9,4)
grid_name = 'MODIS_Grid_Daily_1km_Lst'
sd_names = ['Lst_day_1km']
out_method = 0
convert_modis_data,in_file=grid_file, $ ; I believe 'convert_modis_data' should
; be changed into green color, but remained in black!!!
out_path=output_path, out_root=output_rootname, $
/higher_product, /grid, gd_name=grid_name, sd_names=sd_names, $
out_method=out_method,background=255, fill_replace_value=255
endfor
cd,output_path
inputs=file_search('Landinputs*'+strtrim(string(date,format= '(I03)'), 2)+'*.img',count=inputfiles)
;fids=lindgen(inputfiles)
print,'inputfiles',inputfiles
for i=0,inputfiles-1 do begin
envi_open_file,inputs[i],r_fid=afile
fids[i]=afile
endfor
numfiles=n_elements(fids)

if numfiles eq 4 then begin
;*******START MOSAIC
;pos=[[0,1],[0,1],[0,1],[0,1]]
pos=[[0],[0],[0],[0]]
; out_ps=[[463.31271653,463.31271653]] This parameter is for 500m tiles.
out_ps = [926.6254331, 926.6254331]
use_see_through = [[1L],[1],[1],[1]]
see_through_val = [[0L],[0],[0],[0]]
bandnames=['Lst_day_1km']
;out_name=input_path+'mosaicking'+strtrim(date,2)+'.dat'
georef_mosaic_setup, fids=fids, out_ps=out_ps, dims=dims, xsize=xsize, ysize=ysize, x0=x0, y0=y0, map_info=map_info
envi_doit,'mosaic_doit',fid=fids,pos=pos,dims=dims,x0=x0,y0= y0,background=0,out_dt=2,map_info=map_info,/georef, $
xsize=xsize,ysize=ysize,pixel_size=out_ps,see_through_val=se e_through_val,use_see_through=use_see_through,out_bname=band names,r_fid=mosaic
;******REMOVE FIDS AND DELETE INPUTS
for i=0,numfiles-1 do begin
envi_file_mng, id=fids[i],/remove; ,/delete
endfor
endif
print,"It's done!!"
endfor
end
Re: MODIS Conversion ToolKit is not working? Can anyone help me? [message #92598 is a reply to message #92594] Wed, 20 January 2016 03:26 Go to previous message
devin.white is currently offline  devin.white
Messages: 50
Registered: March 2007
Member
The color is less important than making sure that the mctk.sav file is properly installed and ENVI is restoring it when it starts. You should see something like "Restored File: MCTK" in the console if that is happening, but you can also try this:

help, names='convert_modis_data', /routines, /full

If the compiled procedures section is blank, the plugin is not restored. Please carefully follow the installation instructions and note the supported ENVI versions (5.0 and higher).


On Tuesday, January 19, 2016 at 7:29:09 PM UTC-5, kim4ec...@gmail.com wrote:
> I am working on mosaicking 4 MODIS tiles, and trying to use MODIS Conversion Tool Kit.
>
> However, I faced a problem. After I downloaded MCTK from this site,
>
> https://github.com/dawhite/ENVIPlugins
>
>
> I placed "mctk.sav" and "modis_products.scsv" files in my save_add folder. the location is:
>
> Windows: c:\program files\exelis\envi52\classic\save_add
>
>
> Now, I found "% Restored file: MCTK" when I began ENVI classic. I think my IDL-ENVI recognizes those two files. However, The color of 'convert_modis_data' is still black, not yet changed to green as shown in user's guide.
>
> Can anyone give me any solutions?
>
> Please take a look at the attached file, and let me know what to do.
>
> Thank you, in advance!
>
> Harry from Korea
>
> ------------------------------------------
> pro Mosaic_011916
>
> ; Path designation
> input_path = 'G:\test_mosaic\' ; add more details.
>
> for date=0,4 do begin
>
> ;print,'Processing MODIS images of DOY',date
> dir=input_path
> cd,dir
> files=FILE_SEARCH('MOD11A1*'+strtrim(string(date,format='(I0 3)'), 2)+'.h*.hdf',count=num_inputfiles)
> ;print,numfiles
>
> output_path = 'G:\test_mosaic\Mosaic\'
> ;MODIS grid file
>
> format='MOD11A1.A2007001.h28v05.005.2008135100357.hdf'
> ;START IMPORTING MODIS LAYERS
> for i=0,num_inputfiles-1 do begin
> grid_file=files[i]
> output_rootname = 'Landinputs_'+strtrim((strmid(grid_file,9,7)+'_'+strmid(grid _file,17,6)),2)+'_'
> year=strmid(grid_file,9,4)
> grid_name = 'MODIS_Grid_Daily_1km_Lst'
> sd_names = ['Lst_day_1km']
> out_method = 0
> convert_modis_data,in_file=grid_file, $ ; I believe 'convert_modis_data' should
> ; be changed into green color, but remained in black!!!
> out_path=output_path, out_root=output_rootname, $
> /higher_product, /grid, gd_name=grid_name, sd_names=sd_names, $
> out_method=out_method,background=255, fill_replace_value=255
> endfor
> cd,output_path
> inputs=file_search('Landinputs*'+strtrim(string(date,format= '(I03)'), 2)+'*.img',count=inputfiles)
> ;fids=lindgen(inputfiles)
> print,'inputfiles',inputfiles
> for i=0,inputfiles-1 do begin
> envi_open_file,inputs[i],r_fid=afile
> fids[i]=afile
> endfor
> numfiles=n_elements(fids)
>
> if numfiles eq 4 then begin
> ;*******START MOSAIC
> ;pos=[[0,1],[0,1],[0,1],[0,1]]
> pos=[[0],[0],[0],[0]]
> ; out_ps=[[463.31271653,463.31271653]] This parameter is for 500m tiles.
> out_ps = [926.6254331, 926.6254331]
> use_see_through = [[1L],[1],[1],[1]]
> see_through_val = [[0L],[0],[0],[0]]
> bandnames=['Lst_day_1km']
> ;out_name=input_path+'mosaicking'+strtrim(date,2)+'.dat'
> georef_mosaic_setup, fids=fids, out_ps=out_ps, dims=dims, xsize=xsize, ysize=ysize, x0=x0, y0=y0, map_info=map_info
> envi_doit,'mosaic_doit',fid=fids,pos=pos,dims=dims,x0=x0,y0= y0,background=0,out_dt=2,map_info=map_info,/georef, $
> xsize=xsize,ysize=ysize,pixel_size=out_ps,see_through_val=se e_through_val,use_see_through=use_see_through,out_bname=band names,r_fid=mosaic
> ;******REMOVE FIDS AND DELETE INPUTS
> for i=0,numfiles-1 do begin
> envi_file_mng, id=fids[i],/remove; ,/delete
> endfor
> endif
> print,"It's done!!"
> endfor
> end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: QUERY_DICOM crashes on DICOMDIR
Next Topic: 8 byte to double?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:22:42 PDT 2025

Total time taken to generate the page: 0.02503 seconds