SRTM DTED read routines in IDL? [message #43599] |
Wed, 20 April 2005 18:58  |
andrew.cool
Messages: 47 Registered: July 2003
|
Member |
|
|
Hello All,
Does anyone have IDL code to read 3 arcsec Shuttle Radar Topography
Mission (SRTM) DTED files that they'd care to share?
TIA,
Andrew Cool
andrew.cool_at_dsto.defence.gov.au
|
|
|
Re: SRTM DTED read routines in IDL? [message #43781 is a reply to message #43599] |
Mon, 25 April 2005 10:36  |
marit
Messages: 4 Registered: September 1995
|
Junior Member |
|
|
> (4) Data Records (1201 records at 2414 3429,5843,
> bytes/record)** 8257, etc.
>
>
> I see how the value of 1201 is derived, but 2414bytes/record? Even
converting
> that to integers gives 1207, which ain't 1201, or anything else that
seems
> to make sense.
there is probably a few bytes of line header for each line
> It should be as simple as :-
>
> readu,lun,UHL ;(bytarr(80))
> readu,lun,DSID ;(bytarr(648))
> readu,lun,AR ;(bytarr(2700))
> readu,lun,square_degree_of_data ;(bytarr(1201,2414))
>
change a to:
a = intarr(1207,1201)
then discard leading or trailing integers as necessary.
If the number of line header bytes is odd, make array "a" a byte
array (bytarr(2414,1201)) and convert to integers with fix (i.e.
fix(a[*,i],x,1201), for each line where x is the length of the line
header in bytes)
it could also be possible to make an array of line structures,
where each line structure had a header and a data member,
(a= replicate({h:bytarr(12),d:intarr(1201)},1201) ) but I
don't recall if idl tries to align structure members on 2 or 4
byte boundaries on some platforms on I/O, so that might not
always work
|
|
|
|