ADF format in IDL [message #56619] |
Fri, 02 November 2007 00:33 |
mdoubkova
Messages: 4 Registered: September 2007
|
Junior Member |
|
|
I have another suggestion. I have to admit that I got scared (as
usual) by the ESRI format, in this case ESRI GRID binary format. I
think I would spend a whole day figuring out how to read this since I
am not a programmer, but geographer with some programming skills. So
here is another possible solution:
convert ESRI GRID to ascii grid and then simply read it using
read_ascii in IDL
1) converting to ascii grid bunch of files
&s count := [filelist * outfile -grid]
&if %count% <= 0 &then
&return Error generating output file.
&s unit := [open outfile ok -read]
&do I := 1 &to %count%
&s cover := [read %unit% ok]
&s output = %cover%_ascii
GRIDASCII %cover% %output%
&end
&s ok := [close %unit%]
&s ok := [delete outfile -file]
&return
2) coverting to simple binary file
data=read_ascii(file, data_start=6,num_records=nrows,delimiter=' ')
data=data.(0)
openw,lun,outfile,/get_lun
writeu, lun, data
close,lun,/force
free_lun,lun
Hope this may be helpful,
Marcela
|
|
|