function ShowBathy(XYZ)
% Visualize bathymetries

%% show path in topview
figure
 scatter(XYZ.X,XYZ.Y)
axis equal
 
%% Show interpolated bathy 
figure  
gridsize=10;
 [XI,YI] = meshgrid(min(XYZ.X):gridsize:max(XYZ.X), min(XYZ.Y):gridsize:max(XYZ.Y));
 ZI = griddata(XYZ.X,XYZ.Y,XYZ.Z,XI,YI);
 pcolor(XI,YI,ZI) 
 hold on;

 plot(XYZ.X,XYZ.Y,'.w','MarkerSize',3)        % Show location with both GPS and depth sounding
 
ylabel('Northing in m')
xlabel('Easting in m')
% 
shading interp
axis auto
axis equal

caxis([-10 0])
colorbar

%% Show interpolated bathy 3D
figure  

surf(XI,YI,ZI) 
 hold on;

 plot3(XYZ.X,XYZ.Y,XYZ.Z,'.w','MarkerSize',3)        % Show location with both GPS and depth sounding

 
[C,h] = contour3(XI,YI,ZI,[-9:1:0],'--k');
clabel(C,h,'LabelSpacing',72,'FontSize',10,'Color','k','Rotation',0) ;
 
 
ylabel('Northing in m')
xlabel('Easting in m')
zlabel('NAP m')

% 
shading interp

caxis([-10 0])
colorbar




