% This script is use to demo data inporting for the matlab % It will use the self-prepared dataset in 'Geotiff' folder % and 'Profile' folder clear all; clc; close all; % go to data location cd D:\GE110\Lab_8\Geotiff\ % load DEM [Z, R, bbox] = geotiffread('kuitun_dem.tif'); H = double(Z); % plot DEM subplot(3,1,1); mapshow(H, R, 'DisplayType', 'texturemap'); colormap(demcmap(Z)); axis image; grid on; hold on xlabel('E (m)') ylabel('N (m)') % Plot Profile cd D:\GE110\Lab_8\profile\ profile = load('profile_demo.txt'); % [x, y, z, distance] plot(profile(:,1), profile(:,2)); % Plot Projected profile Proj = load('proj_line.dat','-ascii'); %[x, y, distance, Z] subplot(3,1,2) plot(Proj(:,3),Proj(:,4)); xlabel('Distance') ylabel('Elevation') % Plot 1:1 profile subplot(3,1,3) plot(Proj(:,3),Proj(:,4)); xlabel('Distance') ylabel('Elevation') axis equal