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

Home » Public Forums » archive » Re: DEM GTOPO30
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: DEM GTOPO30 [message #71144] Tue, 01 June 2010 07:57 Go to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi Jean,

Thanks for your reply. I realized that is not very difficult to read
the DEM files

topo = INTARR(ncols,nrows)
OPENR, 1, dem_file, /SWAP_ENDIAN
READU, 1, topo
CLOSE, 1

Thanks,
nata
Re: DEM GTOPO30 [message #71145 is a reply to message #71144] Tue, 01 June 2010 07:37 Go to previous messageGo to next message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
On 01/06/2010 9:56 AM, nata wrote:
> Dear All,
>
> I'm trying to read some digital elevation models (GTOPO30) from
> http://eros.usgs.gov/#/Find_Data/Products_and_Data_Available /gtopo30_info.
>
> I was wondering if anyone have any IDL routines for working with the
> vector and raster data formats...
>
> Thanks a lot !
>
> nata

Hi,

a few years ago, the simplest way was to convert the dem to xyz
triplets, then to read this into IDL. (I just had to load the files
once, it might be different if you want to interactively select the
files etc).

I was using the tool from http://data.geocomm.com/dem/dem2xyzn/ (the 2nd
one, NOT sdts2dem.exe).

In IDL, I wrote a program to convert the DEM filenames to DOS compatible
names (required by the tool). Then I wrote another program to create the
command for the tool (input, output and write random character to answer
the question "press any key to continue"), in a loop (for every DEM
input) and spawn dem2xyzn.exe with the command ( spawn, 'dem2xyzn <
dem2xyz_command.txt' )

Jean
Re: DEM GTOPO30 [message #71252 is a reply to message #71144] Thu, 03 June 2010 01:04 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Jun 1, 7:57 am, nata <bernat.puigdomen...@gmail.com> wrote:
> Hi Jean,
>
> Thanks for your reply. I realized that is not very difficult to read
> the DEM files
>
>   topo = INTARR(ncols,nrows)
>   OPENR, 1, dem_file, /SWAP_ENDIAN
>   READU, 1, topo
>   CLOSE, 1
>
> Thanks,
> nata

How could we find ncols,nrows?
Cheers
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Contour data with two different lon/lat grids onto the same map projection
Next Topic: Re: Help overplotting contours and surface

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

Current Time: Wed Oct 08 13:31:13 PDT 2025

Total time taken to generate the page: 0.00599 seconds