reading xyz-data from ascii-file [message #19691] |
Thu, 13 April 2000 00:00 |
J�rg Schliwa
Messages: 12 Registered: April 2000
|
Junior Member |
|
|
Hy Folks!
I've got a problem x,y,z-koordinates from a ascii-file. The file looks like
this:
500338.29 500246.22 4
500341.32 500210.1 4
500344.12 500243.24 6.5
...
The problem is, when I read the data, IDL rounds the values!
The programcode is:
filename=dialog_pickfile(/read)
openr, lun, filename, /Get_Lun
While not eof(lun) Do Begin
readf, lun, egal
zeilen=zeilen+1
endwhile
Point_Lun, lun, 0
temp1=0.0
temp2=0.0
temp3=0.0
x=fltarr(zeilen)
y=fltarr(zeilen)
z=fltarr(zeilen)
For j=0, zeilen-1 Do Begin
readf, lun, temp1, temp2, temp3
x[j]=temp1
y[j]=temp2
z[j]=temp3
endfor
After running this code, x[0] is 500338. instead of 500338.29
Does anybody know why IDL does round the values?
Thanks, J�rg
Germany
|
|
|