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

Home » Public Forums » archive » SRTM DTED read routines in IDL?
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
SRTM DTED read routines in IDL? [message #43599] Wed, 20 April 2005 18:58 Go to next message
andrew.cool is currently offline  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 Go to previous message
marit is currently offline  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
Re: SRTM DTED read routines in IDL? [message #43794 is a reply to message #43599] Sun, 24 April 2005 08:03 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Andrew Cool wrote:
...
> (4) Data Records (1201 records at 2414 3429,5843,
> bytes/record)** 8257, etc.

What does the footnote cross-referenced by the "**" say?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: apologize
Next Topic: IDL HELP Problem in IDLWAVE

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

Current Time: Wed Oct 08 14:56:02 PDT 2025

Total time taken to generate the page: 0.00471 seconds