comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » envi_file_coordinates
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
envi_file_coordinates [message #67564] Fri, 31 July 2009 01:47
woods1 is currently offline  woods1
Messages: 24
Registered: August 2009
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Question about the installation of IDL AACGM DLM
Next Topic: Creating colour-coded plots of spectra

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:31:33 PDT 2025

Total time taken to generate the page: 0.00647 seconds