Graphics Programs Reference
In-Depth Information
SRTM(find(SRTM == -32768)) = NaN;
Finally, we check whether the data are now correctly stored in the work-
space by printing the minimum and maximum elevations of the area.
max(SRTM(:))
ans =
3992
min(SRTM(:))
ans =
1504
In our example, the maximum elevation of the area is 3992 m, the minimum
altitude is 1504 m above sea level. A coordinate system can be defi ned by
using the information that the lower-left corner is s01e036 . The resolution is
3 arc seconds corresponding to 1/1200 degrees.
[LON,LAT] = meshgrid(36:1/1200:37,-1:1/1200:0);
A shaded grayscale map can be generated from the elevation data using
the function surfl . This function displays a shaded surface with simulated
lighting.
figure
surfl(LON,LAT,SRTM)
shading interp
colormap gray
view(0,90)
colorbar
This script opens a new fi gure window, generates the shaded-relief map us-
ing interpolated shading and a gray colormap in an overhead view. SRTM
data contain considerable amount of noise, we fi rst smooth the data using
an arbitrary 9x9 pixel moving average fi lter. The new matrix is stored in the
matrix SRTM_FILTERED .
B = 1/81 * ones(9,9);
SRTM_FILTERED = filter2(B,SRTM);
The corresponding shaded-relief map is generated by
figure
surfl(LON,LAT,SRTM_FILTERED)
shading interp
colormap gray
view(0,90)
colorbar
Search WWH ::




Custom Search