# VMT_MeanXS2GE

## PURPOSE

Outputs the mean cross section (plan view) from VMT to Google Earth

## SYNOPSIS

function VMT_MeanXS2GE(A,V,pathstr,filestr)

## DESCRIPTION

     Outputs the mean cross section (plan view) 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-16-09

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function VMT_MeanXS2GE(A,V,pathstr,filestr)
    0002 % Outputs the mean cross section (plan view) from VMT to Google Earth
    0003 % (saved as a .kmz file in the VMTProcFiles directory).  The file is then
    0004 % opened in Google Earth is 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 utmzonemat = repmat(A(1).Comp.utmzone(2,:),size(gex')); %
    0015 [mcslat,mcslon] = utm2deg(gex',gey',utmzonemat);
    0016 if ~isempty(pathstr)
    0017     outfile = [pathstr '\' filestr(1:end-4)];
    0018 else
    0019     outfile = [filestr(1:end-4)];
    0020 end
    0021 GEplot(outfile,mcslat,mcslon); %lncol(n,:)
    0022 eval(['!' outfile '.kmz'])