PTAREAPOLYGON procedure
Calculates the area of a polygon (M.A. Mugglestone, S.A. Harding, B.Y.Y. Lee, P.J. Diggle & B.S. Rowlingson).
Option
Parameters
Description
This procedure takes as input two variates containing the coordinates of a polygon (specified by the XPOLYGON and YPOLYGON parameters) and returns the area of the polygon. The area may be saved in a scalar specified using the parameter AREA.
Printed output is controlled by the PRINT option. The default setting of summary prints the area of the polygon under the heading AREA.
Option: PRINT.
Parameters: YPOLYGON, XPOLYGON, AREA.
Method
A procedure PTCHECKXY is called to check that XPOLYGON and YPOLYGON have identical restrictions. PTAREAPOLYGON then calls PTCLOSEPOLYGON to close the polygon specified by XPOLYGON and YPOLYGON. It then calls a procedure PTPASS to call a Fortran program to calculate the area of the polygon.
Action with
RESTRICT
If XPOLYGON and YPOLYGON are restricted, only the subset of values specified by the restriction will be used in the calculations.