Hi all,
I am trying to use the MCTK programmatically with IDL, I cut and paste in IDL the Level 3 grid example from the MCTK user guide,
I compile and run the code, but I experiment the error:
MCKT ERROR:
Unable to attach specified grid.
Check name against HDF file contents.
And then, appear the warning:
Attempt to call undefined function/procedure: `EOS_GD_CLOSE`.
;Level 3 grid example
pro test_batch_modis_conversion_grid
compile_opt idl2
modis_grid_file = 'C:\JAVIER\imagenes\imagenes_request_2_set\MYD09GQ.A2008244.h12v12.005.2008246180654.hdf'
;The specified output location MUST end in the appropriate path
;separator for your OS
output_location = 'C:\javier\borrar\'
output_rootname = 'monthly_NDVI'
grid_name = 'MOD_Grid_monthly_1km_VI'
sd_names = ['1 km monthly NDVI','1 km monthly EVI']
;Output method schema is:
;0 = Standard, 1 = Reprojected, 2 = Standard and reprojected
out_method = 1
output_projection = envi_proj_create(/geographic)
;Specify the output X and Y pixel sizes in double precision floating
;point. Sizes must be in units relevant to selected output projection
;(degrees in this example).
out_ps_x = 0.008370d
out_ps_y = 0.008370d
;The interp_method keyword uses the same numbering scheme as
;ENVI_REGISTER_DOIT's METHOD keyword
;Choosing Triangulation with Nearest Neighbor.
interpolation_method = 6
;Set reprojection background and any native fill values to -999
;Setting num_x_pts to 50 and num_y_pts to 50 results in 2500 GCPs.
;That should be more than enough....
convert_modis_data, in_file=modis_grid_file, $
out_path=output_location, out_root=output_rootname, $
/higher_product, /grid, gd_name=grid_name, sd_names=sd_names, $
out_method=out_method, out_proj=output_projection, $
out_ps_x=out_ps_x, out_ps_y=out_ps_y, num_x_pts=50, $
num_y_pts=50, interp_method=interpolation_method, $
background=-999, fill_replace_value=-999
end
someone can help me…
thanks in advance!,
Javier
|