# VMT_MeanXS2GE_3D

## PURPOSE

Outputs the mean cross section (3-D) from VMT to Google Earth (saved as a

## SYNOPSIS

function VMT_MeanXS2GE_3D(A,V,pathstr,filestr,vscale,voffset)

## DESCRIPTION

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

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

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

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

## SOURCE CODE

    0001 function VMT_MeanXS2GE_3D(A,V,pathstr,filestr,vscale,voffset)
    0002 % Outputs the mean cross section (3-D) from VMT to Google Earth (saved as a
    0003 % .kmz file in the VMTProcFiles directory).  The file is then opened in
    0004 % Google Earth for viewing.
    0005 %
    0006 % P.R. Jackson, USGS, 1-16-09
    0007
    0008
    0009 %Output the mean cross section to Google Earth
    0010
    0011 %lncol = ['-r';'-b';'-g';'-c';'-m';'-y';'-k';'-w'];
    0012 gex = nanmean(V.mcsX,1);
    0013 gey = nanmean(V.mcsY,1);
    0014 gez = vscale.*(voffset-V.mcsBed);
    0015 utmzonemat = repmat(A(1).Comp.utmzone(2,:),size(gex')); %
    0016 [mcslat,mcslon] = utm2deg(gex',gey',utmzonemat);
    0017 if ~isempty(pathstr)
    0018     outfile = [pathstr '\' filestr(1:end-4)];
    0019 else
    0020     outfile = [filestr(1:end-4)];
    0021 end
    0022 GEplot_3D(outfile,mcslat,mcslon,gez); %lncol(n,:)
    0023 eval(['!' outfile '.kmz'])