Skip to content
eoudejans edited this page Nov 29, 2023 · 7 revisions

Geometric functions mid

syntax

  • mid(polygon_data_item)

definition

mid(polygon_data_item) results in a point data item with the middle of the polygon_data_item argument.

description

The middle of a polygon is determined by selecting a horizontal scan-line that separates 50% of the area of that polygon above and below that scan-line, and on that scan-line, the 50% percentile of a set of evenly distributed points on that scan-line that are within that polygon.

If the scan line does not contain any points within the polygon (for example on a hourglass-shaped polygon with an zero-sided waist), other scan-lines are tried until a point is found for which point_in_polygon would result in true.

applies to

implementation details:

image

For more info on SelectRow and GetScanPoint, see:

Clone this wiki locally