[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDL Procedure to read/write USGS DEMs




Reading DEMs are pretty simple. Below is an sample of a routine I used to
read the GTOPO30 Elevation data from the CD. Swapping is required if you
are on a PC.

Kelly Dean
CSU/CIRA

========================Colsm.pro=========================

PRO COLsm
;
; Retrieve an area around Colorado
;
topo = INTarr(4800,6000)

OpenR, 1, 'e:\w140n90\w140n90.dem', /swap_endian ; Swapping required on PCs

ReadU, 1, topo
Close, 1

 ;  Rotating not really required, IDL displays from bottom to top. Just my
preferred method.
topo = ROTATE(TEMPORARY(topo),7)

toposmall = topo(4150:4249, 0:99) ; Retrieve Colorado

SHADE_Surf, toposmall, shades = BYTscl(toposmall), ax=83, az=0
LoadCT, 11

END
=========================================================
John Brock wrote:

> I am working on integrating topographic data at various spatial
> resolutions within a single
> USGS 7.5 minute DEM.  This requires changing the data structure for a
> DEM to
> handle sections of variable resolution.
>
> Does anyone know of an existing IDL procedure that reads or writes USGS
> DEMs?
> (DEM = digital elevation model).  If so, I would like to use it as a
> starting point.
>
> Thanks,
>
> John Brock