Calculates the area of a polygon (M.A. Mugglestone, S.A. Harding, B.Y.Y. Lee, P.J. Diggle & B.S. Rowlingson).
|What to print (
||Vertical coordinates of each polygon; no default – this parameter must be set|
||Horizontal coordinates of each polygon; no default – this parameter must be set|
||Scalars to receive the areas of the polygons|
This procedure takes as input two variates containing the coordinates of a polygon (specified by the
YPOLYGON parameters) and returns the area of the polygon. The area may be saved in a scalar specified using the parameter
Printed output is controlled by the
summary prints the area of the polygon under the heading
PTCHECKXY is called to check that
YPOLYGON have identical restrictions.
PTAREAPOLYGON then calls
PTCLOSEPOLYGON to close the polygon specified by
YPOLYGON. It then calls a procedure
PTPASS to call a Fortran program to calculate the area of the polygon.
YPOLYGON are restricted, only the subset of values specified by the restriction will be used in the calculations.
Commands for: Spatial statistics.
CAPTION 'PTAREAPOLYGON example'; STYLE=meta VARIATE xpoly; VALUES=!(0.0,0.5,0.5,0.0) & ypoly; VALUES=!(0.0,0.0,0.5,0.5) PTAREAPOLYGON YPOLYGON=ypoly; XPOLYGON=xpoly