PRO My_practice
compile_opt idl2
envi, /restore_base_save_files
envi_batch_init, log_file='batch.txt'
Fname='E:\Aly\LST\Night\MOD11_L2.A2013175.1620.005.201317609 2754.hdf'
ENVI_OPEN_DATA_FILE, Fname, /HDF_SD , HDFSD_DATASET=2, R_FID=fid
; Get dimensions of input image
envi_file_query, fid, ns=ns, nl=nl, nb=nb,dims=dims
pos = lindgen(nb)
;GPS points and pixel location:
pts = [[583695.9901, 7911358.9359, 720.00, 514.00], $
[582018.7661, 7914627.4129, 638.00, 365.00], $
[578079.7761, 7910047.9329, 465.00, 582.00], $
[578374.0861, 7909281.7329, 478.00, 623.00], $
[583118.377, 7911923.053, 688.00, 487.00], $
[581074.1161, 7913623.7529, 599.00, 414.00], $
[577392.7161, 7908451.1629, 433.00, 660.00]]
units = ENVI_TRANSLATE_PROJECTION_UNITS('Meters')
datum = 'WGS-84'
;
; Create the UTM projection
;
Proj = ENVI_PROJ_CREATE(/utm, zone=43, $
datum=datum, units=units)
pixel_size = [30., 30.]
; Perform the image-to-map registration.
envi_doit, 'envi_register_doit', $
w_fid=fid, w_pos=pos, w_dims=dims, $
method=7, /envi_output_to_external_format, /TIFF, out_name='E:\Aly\georeferenced by idl/test1.tif', $
pts=pts, pixel_size=pixel_size, $
proj=proj, r_fid=use_fileID
ENVI_batch_exit
END
This program perfectly works, but due to pts values geo-referencing is incorrect, pls help me?
alisoomro66@yahoo.com
|