Finds first polygon overlapping the input polygon and calculates the percentage of the input polygon overlapped by the polygon in the object file.
Syntax
intl pipObjectFindFirstPolygonEx ( pipObjectFile obj_h, intl *points, intl
*numPointsPerPoly, intl numPolygons, pstr nameBuffer, intl bufSize, intl
numIncrements, double* percentage);
Arguments
obj_h File handle from pipObjectFileOpen. Input.
*points Input polygon; an array of x,y point values. Input.
*numPointsPerPoly Array of point counts for each polygon in the region. Input. numPolygons Number of polygons in region to search. Input.
nameBuffer A pointer to a buffer to be filled with the identifier of the object from the object file which the input polygon overlaps. Output.
bufSize The size of the buffer that contains the identifier of the object which the input region overlaps. If the buffer size is smaller than the identifier, the identifier is truncated. Input.
numIncrements Number of increments used in the overlap percentage calculation.
Input.
percentage Calculated overlap percentage. Output.
Return Value
PIP_ERROR PIP_NOT_FOUND PIP_REGION_OVERLAP PIP_INPUT_IN_OBJECT PIP_OBJECT_IN_INPUT PIP_OBJECT_EQUALS_INPUT
Prerequisites
pipObjectFileOpen.
Alternates
pipObjectFindFirstPolygon, pipCheckForRegionOverlapEx.
Notes
This function compares an input polygon with polygons in an existing object file. If any region in the object file intersects with the input region, the intersection type is returned. If no overlapping region is found, the function returns PIP_NOT_FOUND.
If the number of increments is greater than 0 and the percentage is not NULL, this function computes the percentage of the input region overlapped by the region in the spatial file. 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.