FA-70513 / GIS polygon topology / Member archive
Rook and queen polygon adjacency: degenerate edge filter · case 03
Polygons with a repeated corner vertex become rook neighbours of anything sharing that corner.
Case contract
Input [polygons, mode] where each polygon is a closed ring of integer vertices on a noded coverage (shared borders use identical vertices). Rook neighbours share at least one non-degenerate edge irrespective of direction; queen neighbours share at least one vertex. Return, for each polygon index, the ascending list of neighbour indexes (never itself).
Why this case matters
Spatial weights for regional statistics, district contiguity checks and map colouring all start from adjacency.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control #16 | [[1], [0, 2], [1]] | [[1], [0], []] | 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 ↗