function [ dem ] = readtiff( path )
[elevation,R] = geotiffread(path);
info = geotiffinfo(path);
 height = info.Height; % Integer indicating the height of the image in pixels
 width = info.Width;
 %height1 = info.Height; % Integer indicating the height of the image in pixels
% width1 = info.Width;
 [rows,cols] = meshgrid(1:width,1:height);%[rows1,cols1] = meshgrid(1:height1,1:width1);
 % Getting the latitude and longitude of the points
 [lon,lat] = pix2map(info.RefMatrix, cols, rows);
 %[lon1,lat1] = pix2map(info.RefMatrix, rows1, cols1);
 %[lat,lon] = projinv(info, y,x);
%lon1=lon1';
%z=elevation;
dem.lat=flipud(lat);dem.lon=lon;
%Vq = geointerp(double(elevation),R,lat,lon);
dem.z = flipud(elevation);dem.R=R;
end

