Checks if Region A and Region B polygons overlap and calculates the percentage of Region A overlapped by Region B.
Syntax
01 SPHANDLE PIC S9(9) BINARY.
01 NUMINCREMENTS PIC S9(9) BINARY.
01 PERCENTAGE COMP-2.
01 SPRETCODE PIC S9(9) BINARY.
*
CALL ‘SPCKROX' USING SPHANDLE NUMINCREMENTS PERCENTAGE SPRETCODE.
Arguments
SPHANDLE Handle from SPINOCK. Input.
NUMINCREMENTS Number of increments used in the overlap percentage calculation. Input.
PERCENTAGE Calculated overlap percentage. Output.
Return Values
PIP-ERROR
PIP-NO-REGION-OVERLAP PIP-REGION-OVERLAP PIP-REGION-A-IN-B
PIP-REGION-B-IN-A
PIP-REGION-A-EQUALS-B
Prerequisites
SPARAP, SPARBP.
Alternates
SPOFFPX, SPCKRO.
Notes
This procedure compares two regions and evaluates the nature of their overlap (if any). If the number of increments is greater than 0 and percentage is not NULL, this procedure computes the percentage of Region A covered by Region B.
The accuracy and precision of the calculation increases as the number of increments is increased. Note that increasing the number of increments also increases processing time.