Index   |   toolbox > data > srtm > read_hgt.m
<<  Contents srtm/  >>
read_hgt
PURPOSE ^
READ_HGT Reads Topographie from SRTM-HGT-Files
SYNOPSIS ^
function [z,x,y,z0,pc,c] = read_hgt(file,repl,sub);
DESCRIPTION ^
 READ_HGT  Reads Topographie from SRTM-HGT-Files

 [Z,Lon,Lat,NN,PPH,Mask] = READ_HGT( File )
 [Z,Lon,Lat,NN,PPH,Mask] = READ_HGT( [ LAT LON ] )

 A single HGT-Files covers a [ 1 x 1 ] - Tile with
 a Resolution of [ 1201 x 1201 ] (3arcsec). 

 The Coordinates [LAT,LON] refers to the SW-Corner of the Tile,
 the FileName is build like "#LAT*LON.hgt", 
  where "#" is "N" or "S", "*" is "E" or "W".

 The Data are in INT16-Format with big endian order (ieee-be).

 READ_HGT( ... , N ) calls REPL_NAN( Z , N ) to Replace NaN-Values
                      default: 0 (No Replace)

 READ_HGT( ... , N , SUB ) 

 Subsamples Resolution by a negative IntegerValue of SUB
  or increase the Resolution by a positive Value of SUB.
  
 If exist for the specific Tile a a Gray-Scaled-PNG ShoreImage 
  from SRTM_SHORE: #LAT*LON.png; or from SWBD_SHORE: #lon*lat_res.png,
  with the ColorValues: Land == 000, Ocean == 255, 000 < Lakes < 255;
 the Values on Ocean are set to NaN, the Values on Lakes will averaged.

 Special Values for returned Gray-Mask: 

  Red ---> 77 / Green ---> 88 / Blue ---> 99

 READ_HGT( ... , N-i ) does not read/use the ShoreImage

 READ_HGT( ... , N+1i ) does not average the Lake-Z-Values
 READ_HGT( ... , N+2i ) does not set Ocean-Z-Values
 READ_HGT( ... , N+3i ) does not modify any Z-Values by C

 NN   = Mean(Z==Ocean) + i * Median(Z==Ocean)
 PPH  = Percent of Ocean
 Mask = Mask of ShoreImage

 see also: SRTM_SHORE, SWBD_SHORE

DOWNLOAD M-File ^
26.6 KByte
CROSS-REFERENCE INFORMATION ^
This function calls:
This function is called by:
SUBFUNCTIONS ^
 
 
 
 
 
 
 
 
 


Generated on Sat 09-May-2009 10:36:05 by m2html © 2003, Revision by Ch.Begler 2008
^