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

Home » Public Forums » archive » Re: 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
Re: SRTM DTED read routines in IDL? [message #43591] Wed, 20 April 2005 20:35 Go to next message
b_gom is currently offline  b_gom
Messages: 105
Registered: April 2003
Senior Member
Andrew,

if we're talking about the same file format (.hgt), then the 3 arc-sec
data is simply a 1201x1201 integer array in a binary file, and the
coordinates are given by the file name. The area is 1 sq degree. READU
is all you need.

Brad
Re: SRTM DTED read routines in IDL? [message #43795 is a reply to message #43591] Sun, 24 April 2005 04:27 Go to previous message
andrew.cool is currently offline  andrew.cool
Messages: 47
Registered: July 2003
Member
b_gom@hotmail.com wrote in message news:<1114054501.935858.78890@l41g2000cwc.googlegroups.com>...
> Andrew,
>
> if we're talking about the same file format (.hgt), then the 3 arc-sec
> data is simply a 1201x1201 integer array in a binary file, and the
> coordinates are given by the file name. The area is 1 sq degree. READU
> is all you need.
>
> Brad

Hi Brad,

The files on the USGS disk are .dt1 files, and the readme.txt says :-

(1) User Header Label (UHL: 80 bytes) 1
(2) Data Set Identification Record (DSI: 648 bytes) 81
(3) Accuracy Record (ACC: 2700 bytes) 729
(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.

I've tried your suggestion of a simple READU of an INTARR(1201,1201) array,
but that produces a diagonally striped pattern of data that no amount of
transposing or rotating will fix.

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))

I can get TV a recognisable map out of this, but there are "extra" segments
on the right and top of the correct map area.

I've searched the SRTM forum, but there's no mention of IDL there, which
surprised me, so I'm hoping that mentioning SRTM here will make someone's
ears prick up... ;-)

Cheers,

Andrew
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: apologize
Next Topic: Basic Math: I _hope_ this is a stupid question

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

Current Time: Wed Oct 08 11:00:08 PDT 2025

Total time taken to generate the page: 0.00539 seconds