function  A = area_bnd(bnd)

% AREA_BND calculates area for each polygon in a 
% boundary file, bnd, in "polyform.m" format.

%Created by T.E.Smith Jan.19,2004

%OUTPUT:  A = vector of areas for each polygon in bnd.

Z = polyform(bnd);

k = size(Z,1);

A = zeros(k,1);

for i = 1:k
    
    I = [Z(i,1):Z(i,2)]';
    
    x = bnd(I,1);
    
    y = bnd(I,2);
    
    A(i) = area_poly(x,y);
    
end
    
    




