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

Elvis Dowson elvis.dowson at mac.com
Sun Oct 12 17:31:58 EDT 2008


Hi,
          I've been doing a bit of reading, so in essence, SRTM data  
is nothing but raster data, stored using 16-bit signed integer.  
Depending upon the arc length, you will have either 1201x1201 or  
3601x3601 data elements. So, all I have to do is to import each value,  
taking take to perform byte swapping, since I am using a Mac Book Pro  
with an Intel processor, and read in two bytes of data, corresponding  
to a pixel element value, that can later be used to create a raster  
image of height field data.

I guess the next step is to create a vtkSRTMReader class for VTK, and  
construct a vtkImageData object as output, which can then be used to  
render a height field.

Any help or pointers to some examples would be greatly appreciated,  
since it will help me build this class quickly. :-) !

Best regards,

Elvis Dowson

On Oct 12, 2008, at 11:36 PM, Elvis Dowson wrote:
>
> DEM File (.HGT)
> The DEM is provided as 16-bit signed integer data in a simple binary  
> raster. There are no header
> or trailer bytes embedded in the file. The data are stored in row  
> major order (all the data for row
> 1, followed by all the data for row 2, etc.).
> All elevations are in meters referenced to the WGS84/EGM96 geoid as  
> documented at http://
> www.NGA.mil/GandG/wgsegm/.
> Byte order is Motorola ("big-endian") standard with the most  
> significant byte first. Since they are
> signed integers elevations can range from -32767 to 32767 meters,  
> encompassing the range of
> elevation to be found on the Earth.
> These data also contain occassional voids from a number of causes  
> such as shadowing, phase
> unwrapping anomalies, or other radar-specific causes. Voids are  
> flagged with the value -32768.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081013/20cbbf45/attachment.htm>


More information about the vtkusers mailing list