Re: DEM GTOPO30 [message #71144] |
Tue, 01 June 2010 07:57  |
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   |
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  |
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
|
|
|