function [piddat, pt] = plotHeights(fname, datum, varargin)
% function [piddat, pt] = plotHeights(fname, datum, [scale], [elimPtFile])
% 
% read data from specified file, and plot vectors onto
% regional basemap; activates tooltip window to describe
% point information (PID, lat/lon, etc)
% 
% required inputs:
%   fname         vector file name (specify path relative to pwd)
% optional inputs:
%   scale         scale factor for vectors (default: 1)
%   elimPtFile    file containing PIDs for eliminated points
% outputs:
%   piddat  name of point and datum (cell array)
%           1 pid (non-unique)
%           2 datum (29, 88, or blank [])
%   pt      dimensions (#piddat x 3)
%           1-2 lat/long (deg)
%           3   height (m)

VERTCONpath;

% read datafile
tic;
[piddat,pt] = readHfile(fname);
toc
% pt = [lat lon ht];

% % set the region
% C = strsplit(fname,'.');
% if length(C)==5
%     region = C{end-1};
% else
%     region = C{end};
% end
region = 'conus';

[piddat,pt] = replotHeights(piddat, pt, region, datum, varargin{:});

return;

%title(fname);
%title(strrep(strrep(fname,'\','\\'),'_','\_'));
% set vector scale
scl = 1;
if (nargin>1 & ~isempty(varargin{1}))
    scl = varargin{1};
end
title([strrep(strrep(fname,'\','\\'),'_','\_') ' scl=' num2str(scl)]);

return
