# VMT_PlotShoreline

## PURPOSE

Plots a shoreline map given the shoreline data structure 'Map' (see

## SYNOPSIS

function VMT_PlotShoreline(Map)

## DESCRIPTION

     Plots a shoreline map given the shoreline data structure 'Map' (see
     VMT_LoadMap.m) on the current map

     P.R. Jackson, 12-9-08
     Last Modified: Frank L. Engel, 3/13/2013

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- VMT --- THE VELOCITY MAPPING TOOLBOX ---

## SOURCE CODE

    0001 function VMT_PlotShoreline(Map)
    0002 % Plots a shoreline map given the shoreline data structure 'Map' (see
    0003 % VMT_LoadMap.m) on the current map
    0004 %
    0005 % P.R. Jackson, 12-9-08
    0006 % Last Modified: Frank L. Engel, 3/13/2013
    0007
    0008 if isempty(Map) % User hit cancel when selecting shoreline file
    0009     return
    0010 end
    0011
    0012 % See if PLOT 1 exists already, if not make it
    0013 fig_planview_handle = findobj(0,'name','Plan View Map');
    0014
    0015 if ~isempty(fig_planview_handle) &&  ishandle(fig_planview_handle)
    0016     figure(fig_planview_handle);
    0017 else
    0018     fig_planview_handle = figure('name','Plan View Map'); clf
    0019     %set(gca,'DataAspectRatio',[1 1 1],'PlotBoxAspectRatio',[1 1 1])
    0020 end
    0021
    0022 brks = find(Map.UTMe == -9999);
    0023
    0024 for i = 1:length(brks)+1
    0025     if i == 1
    0026         ll = 1;
    0027         if ~isempty(brks)
    0028             ul = brks(i)-1;
    0029         else
    0030             ul = length(Map.UTMe);
    0031         end
    0032         indx =ll:ul;
    0033     elseif i == length(brks)+1
    0034         ll = brks(i-1)+1;
    0035         ul = length(Map.UTMe);
    0036         indx =ll:ul;
    0037     elseif i > 1 & i < length(brks)+1
    0038         ll = brks(i-1)+1;
    0039         ul = brks(i)-1;
    0040         indx =ll:ul;
    0041     end
    0042     figure(fig_planview_handle); hold on
    0043     plot(Map.UTMe(indx),Map.UTMn(indx),'Color', [.3 .3 .3],'LineWidth',2); hold on
    0044     %patch(Map.UTMe(indx),Map.UTMn(indx),'k','EdgeColor','none'); hold on
    0045
    0046 end
    0047 %xlabel('UTM Easting (m)')
    0048 %ylabel('UTM Northing (m)')
    0049 set(gca,'DataAspectRatio',[1 1 1],'PlotBoxAspectRatio',[1 1 1])