| Hi all, i am experimenting problems writing a code to georeference MODIS DATA. 
 I copy and paste the code “example_glt_usage” from ENVI help in the IDL soft 6.2, I change the "[ ]", and I compile and run the code, then I select the images and next the runtime halt with the message error:
 “envi_built_glt_doit: An error has occurred during processing”
 
 Error: “Attempt to subscript DXS with  is out of range.” The result may be invalid.
 
 Some one experimented these error? I attach the code in the bottom..
 thanks,
 Javier
 
 pro modis_geop1, ev
 
 ;compile_opt strictarr
 
 
 
 ;  Select an image and it's associated input geometry.
 
 envi_select, title='Please select an image to georeference', $
 
 dims=dims, fid=fid, pos=pos
 
 if fid eq -1 then return
 
 envi_select, title='Please select the longitude band', $
 
 fid=x_fid, dims=dims, pos=x_pos, /band_only, /no_dims
 
 if x_fid eq -1 then return
 
 envi_select, title='Please select the latitude band', $
 
 fid=y_fid, dims=dims, pos=y_pos, /band_only, /no_dims
 
 if y_fid eq -1 then return
 
 
 
 ;  Figure out what UTM zone we're in.
 
 ;query_dims = [-1L, long(dims[2]/2), long(dims[2]/2), long(dims[4]/2), long(dims[4]/2)]
 
 ;lat_lon = [envi_get_data(fid=y_fid, dims=query_dims, pos=y_pos), $
 
 ;               envi_get_data(fid=x_fid, dims=query_dims, pos=x_pos)]
 
 ;zone = fix(31.0 + lat_lon[1]/6.0)
 
 ;south = (lat_lon[0] lt 0)
 
 
 
 ;  Make the GLT.
 
 envi_file_query, fid, sname=sname
 
 out_name=sname+'_glt'
 
 pixel_size=1000.0D
 
 rotation=0.0
 
 i_proj = envi_proj_create(/geographic)
 
 o_proj = envi_proj_create(/geographic)
 
 envi_glt_doit, i_proj=i_proj, $
 
 o_proj=o_proj, out_name=out_name, $
 
 pixel_size=pixel_size, r_fid=glt_fid, $
 
 rotation=rotation, x_fid=x_fid, y_fid=y_fid, $
 
 x_pos=x_pos, y_pos=y_pos
 
 if glt_fid eq -1 then return
 
 
 
 ;  Georeference the image from the GLT.
 
 out_name=sname+'_georef'
 
 envi_doit, 'envi_georef_from_glt_doit', fid=fid, $
 
 glt_fid=glt_fid, out_name=out_name, pos=pos, $
 
 subset=dims, r_fid=r_fid
 
 
 
 end
 
 
 |