Topology Tools¶
DuckDB-powered geospatial topology utilities for cleaning and reconciling administrative boundary polygons, as a Python/CLI package and library.
Boundary cleaning¶
-
Map source columns to admin code and name columns, then apply the crosswalk.
-
Find gaps and overlaps between units, then clean them.
-
Fit units to a reference boundary so the outer edge follows the agreed outline.
-
Keep the previous release's codes for units that carry over, or cold-start codes when there is no previous release.
-
Review names by hand: duplicates under the same parent, near-duplicate typos, blanks and placeholders, and encoding artifacts.
-
Build per-level polygons, label points, and the boundary line network for release.
Each phase has a step-by-step guide, a tutorial, reference pages (what each tool does) and explanation pages (why it works that way).
Using with agents¶
-
Claude Code: install the plugin in VS Code or a terminal, then run it from Claude Code.
-
Other agents: paste one prompt into any agent that can read a URL. Nothing to install.
Installation¶
The boundary cleaning steps run the topo-tools CLI. Install it with:
Recommended on Windows. mamba and pixi install it from the same channel.
Inputs and outputs: GeoParquet, GeoPackage, Shapefile and GeoJSON. The output format matches the input format.
The tools are also available as a web app, which runs DuckDB in the browser: nothing to install, and files are processed locally.