[vtkusers] How to import NASA SRTM DEM data into VTK

WolfgangZ wollez at gmx.net
Sun Oct 12 05:48:18 EDT 2008


Elvis Dowson schrieb:
> Hi,
>         How can I import NASA SRTM DEM data, stored in a file format 
> called hgt, into VTK-5.3.x? 
> 
> Apparently the *hgt file format can just be renamed to *.dem, but the 
> contents of the file are stored in a format called GTOPO30 DEM, I think. 
> 
> When I opened the SainteHelens.dem file supplied with the VTK Data 
> package, I can see that it consists of ascii values and is human-readable.
> 
> However, when I look at a NASA SRTM file, it appears to be some sort of 
> binary file format. 
> 
> Here is an example of a NASA SRTM 
> file ftp://e0srp01u.ecs.nasa.gov/srtm/version2/SRTM3/Australia/S34E150.hgt.zip
> 
> vtkDEMReader will not directly work with the NASA SRTM file. 
> 
> Has someone implemented a reader that will read in the NASA SRTM file? 
> 
> If someone can help point me in the right direction, I can even spend 
> some time and try to implement a new vtkSRTMReader class.
> 
> Best regards,
> 
> Elvis Dowson
> 
probably the easiest way is to convert it to ascii with gdal_translate 
(see http://www.gdal.org). There you will find also more information on 
the SRTMHGT format: http://www.gdal.org/frmt_various.html#SRTMHGT
As ascii format you can use AAIGrid: 
http://www.gdal.org/frmt_various.html#AAIGrid

But I suppose that in most cases you don't want to use a 
latitude/longitude grid but a rectangular grid. Have a look at Proj4 
http://trac.osgeo.org/proj/

Regards
Wolfgang




More information about the vtkusers mailing list