Skip to main content

topo-tools

CI PyPI Python versions License: MIT

World ADM0 boundaries extended with Voronoi-filled coastline

topo-tools is a collection of DuckDB-powered geospatial topology utilities for cleaning and reconciling administrative boundary polygons, usable from the CLI or as a Python package.

Full documentation: https://ocha-dap.github.io/topo-tools-py/

Tool Description
schema-crosswalk map and apply a source to target schema crosswalk
schema-map infer a source to target schema crosswalk
schema-refactor apply a schema crosswalk
schema-fill fill down admin-hierarchy columns
schema-join copy parent admin-hierarchy columns onto each child
topo-clean detect and fix gap/overlap defects
topo-detect detect gap/overlap defects
edge-match fit a child layer into a parent layer
edge-extend fill gaps with a Voronoi extension
edge-mosaic re-clip an extended child layer into a new parent
edge-clip clip a child layer to its parent
edge-stitch close seams in a tiled layer
change classify changes between two polygon layer versions
package dissolve, label, and line-ify a layer in one call
package-polygons dissolve a layer into coarser admin levels
package-points one label point per admin unit
package-lines deduplicated admin boundary lines

Installation

Install with uv (recommended):

uv tool install topo-tools   # CLI
uv add topo-tools            # Python library

Or with pip/pipx:

pip install topo-tools       # CLI or library
pipx install topo-tools      # CLI

On macOS/Linux, topo-tools is also available via Homebrew, no Python tooling required:

brew install OCHA-DAP/topo-tools/topo-tools

Supported Formats

Polygon inputs/outputs: GeoParquet (.parquet), GeoPackage (.gpkg), Shapefile (.shp), GeoJSON (.geojson). Output format matches input format. change's tabular changelog is CSV or GeoParquet only; its spatial overlay layer supports the same four formats as the other tools.

See CONTRIBUTING.md for development setup.

Release files for topo-tools 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for topo-tools 0.8.2
File Size Uploaded
topo_tools-0.8.2.tar.gz 8.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for topo-tools 0.8.2
File Interpreter ABI Platform
topo_tools-0.8.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 MB

Release files / topo_tools-0.8.2.tar.gz

Download URL topo_tools-0.8.2.tar.gz
Size 8.4 MB
Tags Source
SHA-256 checksum
How to use checksums
891fafacafef3f36ba846d9e0cc338bafcdab0fed905770ec7c5cf33404e5570
BLAKE2b-256 checksum
How to use checksums
fa9830eb4af5470fd24e7ba303060161003216ca82563d0800add37bdfa3c202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / topo_tools-0.8.2-py3-none-any.whl

Download URL topo_tools-0.8.2-py3-none-any.whl
Size 181.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50d68888c3752e3a18776ab53db191dab658e8a55ae9206f55bb5ea422d87f35
BLAKE2b-256 checksum
How to use checksums
6aab542cb7947e64c749c576334d91c87399ac5011ad369e80b3752839b481aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.2 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page