On 31 Jul., 11:40, woods1 <merria...@yahoo.fr> wrote:
> I have any problem,
> here is my program, but the pixels values are not a same with the
> pixels values from the original image
>
> filename = envi_pickfile(title = 'DeMarine-DEKO')
> if(filename eq '')then return
>
> envi_open_file, filename, r_fid=De_fid
>
> envi_file_query, De_fid, ns=ns, nl=nl, nb=nb, pos=pos,$
> dims=dims, data_type=type, sname=sname
>
> dims = [-1L, 0, ns-1, 0, nl-1]
>
> pos = lindgen(nb)
>
> map_info = envi_get_map_info(fid =De_fid)
> print, map_info
>
> proj_u = map_info.proj; Auszug Projektion von Struktur $ MAP
> proj_dd = envi_proj_create(/geographic);Projektion fuer lat/lon
> Daten
> proj_aa = envi_proj_create(/utm, zone= 37, /south, datum=8,
> units=meters )
>
> xf = [0, ns-1]
> yf = [0, nl-1]
>
> ; Establish file coordinate system
> fwest_p=1; NW corner of file is 0,0
> fnorth_p=1; NW corner of file is 0,0
> feast_p=fwest_p+ns
> fsouth_p=fnorth_p+nl
> ; Establish map coordinate system
> fxcent_p=map_info.mc[0]; UTM coordinates defined from center
> fycent_p=map_info.mc[1]; UTM coordinates def. from center
> fxcent_u=map_info.mc[2]
> fycent_u=map_info.mc[3]
> xpxsz_u=map_info.ps[0]
> ypxsz_u=map_info.ps[1]
> fwest_u=fxcent_u+(long(fwest_p-fxcent_p)*xpxsz_u)
> feast_u=fxcent_u+(long(feast_p-fxcent_p)*xpxsz_u)
> fnorth_u=fycent_u+(long(fycent_p-fnorth_p)*ypxsz_u)
> fsouth_u=fycent_u+(long(fycent_p-fsouth_p)*ypxsz_u)
>
> print, 'fxcent_p:',fxcent_p
> print, 'fycent_p:',fycent_p
> print, 'fxcent_u:',fxcent_u
> print, 'fycent_u:',fycent_u
> print, 'fwest_u:',fwest_u
> print, 'feast_u:',feast_u
> print, 'fnorth_u:',fnorth_u
> print, 'fsouth_u:',fsouth_u
>
> ;convert map coordinate boundaries to DD
> envi_convert_projection_coordinates,[fwest_u,feast_u,fxcent_ u,
> feast_u], $
>
> [fycent_u,fycent_u,fsouth_u,fsouth_u],proj_aa,fcornerx_dd,fc ornery_dd,proj_dd
>
> print,fcornerx_dd
> print,fcornery_dd
>
> envi_convert_file_coordinates, De_fid, xmap, ymap, fcornerx_dd,
> fcornery_dd
> print, xmap
> print, ymap
>
> thank you for any help
the samples of the image are 36800 and the lines are 57600
|