FA-70408 / GIS polygon topology / Member archive
Point classification against a polygon with holes: segment extent test · case 03
Points on axis-parallel edges and on vertices are not reported as boundary.
Case contract
Input [point, rings]: exterior ring then hole rings, closed, integer coordinates. A point on any ring edge (exact cross product 0 and inside the closed segment bounding box) is "boundary". Otherwise a crossing-number test with the half-open rule (a.y > py) != (b.y > py) and ray toward +x decides containment: outside the exterior or inside any hole is "exterior", else "interior".
Why this case matters
Parcel lookup, geofencing and spatial joins classify points against polygons with holes; lakes and courtyards must not count as inside.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control #6 | "exterior" | "boundary" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗