# VMT_Shoreline2GE_3D

## PURPOSE

Outputs the shoreline (3-D) from VMT to Google Earth (saved as a .kmz

## SYNOPSIS

function VMT_Shoreline2GE_3D(A,Map,vscale,voffset)

## DESCRIPTION

     Outputs the shoreline (3-D) from VMT to Google Earth (saved as a .kmz
     file in the VMTProcFiles directory).  The file is then opened in Google
     Earth is for viewing.

     P.R. Jackson, USGS, 1-19-09

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function VMT_Shoreline2GE_3D(A,Map,vscale,voffset)
    0002 % Outputs the shoreline (3-D) from VMT to Google Earth (saved as a .kmz
    0003 % file in the VMTProcFiles directory).  The file is then opened in Google
    0004 % Earth is for viewing.
    0005 %
    0006 % P.R. Jackson, USGS, 1-19-09
    0007
    0008
    0009 brks = find(Map.UTMe == -9999);
    0010
    0011 for i = 1:length(brks)+1
    0012     if i == 1
    0013         ll = 1;
    0014         if ~isempty(brks)
    0015             ul = brks(i)-1;
    0016         else
    0017             ul = length(Map.UTMe);
    0018         end
    0019         indx =ll:ul;
    0020     elseif i == length(brks)+1
    0021         ll = brks(i-1)+1;
    0022         ul = length(Map.UTMe);
    0023         indx =ll:ul;
    0024     elseif i > 1 & i < length(brks)+1
    0025         ll = brks(i-1)+1;
    0026         ul = brks(i)-1;
    0027         indx =ll:ul;
    0028     end
    0029
    0030     gex = Map.UTMe(indx);
    0031     gey = Map.UTMn(indx);
    0032     gez = vscale.*voffset.*ones(size(Map.UTMn(indx)));
    0033
    0034     utmzonemat = repmat(A(1).Comp.utmzone(2,:),size(gex)); %
    0035     [sllat,sllon] = utm2deg(gex,gey,utmzonemat);
    0036
    0037     outfile = [Map.infile(1:end-4) '_' num2str(i)];
    0038
    0039     GEplot_3DShoreLine(outfile,sllat,sllon,gez);
    0040     %eval(['!' outfile '.kmz'])
    0041
    0042     clear gex gey gez utmzonemat sllat sllon
    0043
    0044 end