Hi,
i am new here and with idl+envi.
I have any problem
i have this program, but i become a failure, that the Polyfillv: no
points in polygon.
this is my program, the size is ns=36800, nl=58700:
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=0; NW corner of file is 0,0
fnorth_p=0; 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
;**************
;open evf file*
;**************
evf_fname = 'E:\DeMarine-DEKO\coastline\gshhs_land
\gshhs_land_.evf'
evf_id = envi_evf_open(evf_fname)
envi_evf_info, evf_id, num_recs=num_recs, $
data_type=data_type, projection=projection, $
layer_name=layer_name
print, 'Number of Records: ',num_recs
for i=0L,num_recs-1L do begin
;read the record
record = envi_evf_read_record(evf_id, i)
envi_convert_file_coordinates, De_fid,X_polygon_pixel,
Y_polygon_pixel, record[0,*], record[1,*]
print, X_polygon_pixel
print, Y_polygon_pixel
;
polygonIndices = polyfillv(round(X_polygon_pixel),round
(Y_polygon_pixel), ns, nl)
;print, 'Number of nodes in Record '+ $
;strtrim(i+1,2)+':',n_elements(record[0,*])
;print, 'Record Info:'
;print, record
endfor
envi_evf_close, evf_id
thank you for any help
|