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

Home » Public Forums » archive » Read irregular data problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Read irregular data problem [message #92173 is a reply to message #92164] Fri, 23 October 2015 04:33 Go to previous messageGo to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
Try this...

pro tmp_poreh,filename

n_lines=file_lines(filename)
s=strarr(n_lines)
openr,lun,filename,/get_lun
readf,lun,s
free_lun,lun

q=where(strpos(s,"ELEVATION") ne -1)
print,transpose(s[q+1])

data=fltarr(3,n_elements(q))
reads,s[q+1],data

print,data
end

IDL> tmp_poreh,"d:\tmp\poreh.txt"
14.2899550000,41.1586500000,1.379
14.2819110000,41.1528830000,-1.635
14.2899550000,41.1586500000,1.379
14.2819110000,41.1528830000,-1.635
14.2815830000,41.1521640000,-0.805
14.2900 41.1586 1.37900
14.2819 41.1529 -1.63500
14.2900 41.1586 1.37900
14.2819 41.1529 -1.63500
14.2816 41.1522 -0.805000

cheers,
Greg
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Writing 2 arrays of a different type into one text file
Next Topic: Re: MATRIX LOGARITHM (and EXPONENTIAL)

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

Current Time: Wed Oct 08 15:56:45 PDT 2025

Total time taken to generate the page: 0.00422 seconds