Table of Contents
Fetching ...

Mend the gap: A smart repair algorithm for noisy polygonal tilings

Jeanne N. Clelland

TL;DR

This work tackles the problem of recovering an unknown, perfectly tiled region $T^*=igl\{P^*_1,...,P^*_N\bigr\}$ from a noisy polygonal tiling $T=igl\{P_1,...,P_N\bigr\}$ by constructing a repaired tiling $\widetilde{T}=\bigl\{\widetilde{P}_1,...,\widetilde{P}_N\bigr\}$ that closely matches $T^*$. The proposed smart_repair algorithm proceeds in four steps—refined tiling construction, overlap assignment, convexity-driven gap closing, and cleanup—while emphasizing preservation of adjacency relations and convexity, with optional region-aware nesting and rook-to-queen adjacencies. The authors introduce a rich set of geometric tools (outward convexity, strong mutual visibility, shortest-path subdivisions) to subdivide gaps and reassign pieces, and prove that the repaired tiling adheres to the desired adjacency principles. The method is implemented in the Maup Python package and demonstrates practical performance on large state maps (e.g., Colorado, Wisconsin, New York), producing more faithful adjacencies than Quick_repair and enabling robust GIS analyses and redistricting workflows. The work thus provides a principled, geometry-driven repair framework with direct applicability to geospatial data integrity and legal contiguity constraints.

Abstract

Let $T^* = \{P^*_1, \ldots, P^*_N\}$ be a polygonal tiling of a simply connected region in the plane, and let $T = \{P_1, \ldots, P_N\}$ be a noisy version of $T^*$ obtained by making small perturbations to the coordinates of the vertices of the polygons in $T^*$. In general, $T$ will only be an approximate tiling, due to the presence of gaps and overlaps between the perturbed polygons in $T$. The areas of these gaps and overlaps are typically small relative to the areas of the polygons themselves. Suppose that we are given the approximate tiling $T$ and we wish to recover the tiling $T^*$. To address this problem, we introduce a new algorithm, called {\tt smart\_repair}, to modify the polygons in $T$ to produce a tiling $\widetilde{T} = \{\widetilde{P}_1, \ldots, \widetilde{P}_N\}$ that closely approximates $T^*$, with special attention given to reproducing the {\em adjacency relations} between the polygons in $T^*$ as closely as possible. The motivation for this algorithm comes from computational redistricting, where algorithms are used to build districts from smaller geographic units. Because districts in most U.S. states are required to be contiguous, these algorithms are fundamentally based on adjacency relations between units. Unfortunately, the best available map data for unit boundaries is often noisy, containing gaps and overlaps between units that can lead to substantial inaccuracies in the adjacency relations. Simple repair algorithms can exacerbate these inaccuracies, with the result that algorithmically drawn districts based on the ``repaired" units may be discontiguous, and hence not legally compliant. The algorithm presented here is specifically designed to avoid such problems. A Python implementation is publicly available as part of the MGGG Redistricting Lab's {\tt Maup} package, available at https://github.com/mggg/maup.

Mend the gap: A smart repair algorithm for noisy polygonal tilings

TL;DR

This work tackles the problem of recovering an unknown, perfectly tiled region from a noisy polygonal tiling by constructing a repaired tiling that closely matches . The proposed smart_repair algorithm proceeds in four steps—refined tiling construction, overlap assignment, convexity-driven gap closing, and cleanup—while emphasizing preservation of adjacency relations and convexity, with optional region-aware nesting and rook-to-queen adjacencies. The authors introduce a rich set of geometric tools (outward convexity, strong mutual visibility, shortest-path subdivisions) to subdivide gaps and reassign pieces, and prove that the repaired tiling adheres to the desired adjacency principles. The method is implemented in the Maup Python package and demonstrates practical performance on large state maps (e.g., Colorado, Wisconsin, New York), producing more faithful adjacencies than Quick_repair and enabling robust GIS analyses and redistricting workflows. The work thus provides a principled, geometry-driven repair framework with direct applicability to geospatial data integrity and legal contiguity constraints.

Abstract

Let be a polygonal tiling of a simply connected region in the plane, and let be a noisy version of obtained by making small perturbations to the coordinates of the vertices of the polygons in . In general, will only be an approximate tiling, due to the presence of gaps and overlaps between the perturbed polygons in . The areas of these gaps and overlaps are typically small relative to the areas of the polygons themselves. Suppose that we are given the approximate tiling and we wish to recover the tiling . To address this problem, we introduce a new algorithm, called {\tt smart\_repair}, to modify the polygons in to produce a tiling that closely approximates , with special attention given to reproducing the {\em adjacency relations} between the polygons in as closely as possible. The motivation for this algorithm comes from computational redistricting, where algorithms are used to build districts from smaller geographic units. Because districts in most U.S. states are required to be contiguous, these algorithms are fundamentally based on adjacency relations between units. Unfortunately, the best available map data for unit boundaries is often noisy, containing gaps and overlaps between units that can lead to substantial inaccuracies in the adjacency relations. Simple repair algorithms can exacerbate these inaccuracies, with the result that algorithmically drawn districts based on the ``repaired" units may be discontiguous, and hence not legally compliant. The algorithm presented here is specifically designed to avoid such problems. A Python implementation is publicly available as part of the MGGG Redistricting Lab's {\tt Maup} package, available at https://github.com/mggg/maup.
Paper Structure (21 sections, 10 theorems, 3 equations, 26 figures)

This paper contains 21 sections, 10 theorems, 3 equations, 26 figures.

Key Result

Lemma 2.2

Let $v_i$, $v_j$ be two vertices of a simple polygon $P$, and let $\gamma$ be the shortest path within $P$ between $v_i$ and $v_j$. Then all vertices of $\gamma$ are also vertices of $P$.

Figures (26)

  • Figure 1: (a) Randomly drawn Colorado district plan for U.S. House based on 2020 precinct map; (b) Close-up view of a discontiguous district
  • Figure 2: (a) 15 precincts adjacent to a single gap between counties; (b) quick_repair algorithm assigns the entire gap to a single precinct
  • Figure 3: Polygon boundaries each partitioned into 5 outward convex polygonal paths; in both polygons, all non-adjacent pairs $(B_i,B_j)$ except for $(B_1, B_3)$ are strongly mutually visible.
  • Figure 4: Illustration of construction in the proof of Proposition \ref{['smv-prop']}
  • Figure 5: Illustration of construction in the proof of Proposition \ref{['tri-visibility-prop']}
  • ...and 21 more figures

Theorems & Definitions (24)

  • Definition 2.1
  • Lemma 2.2: LP84
  • Proposition 2.3
  • proof
  • Definition 2.4
  • Definition 2.5
  • Proposition 2.6
  • proof
  • Proposition 2.7
  • proof
  • ...and 14 more