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-map map and apply a source to target 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.

Metadata

Release files for topo-tools 0.9.0

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.9.0
File Size Uploaded Provenance Actions
topo_tools-0.9.0.tar.gz 8.4 MB With provenance Details for topo_tools-0.9.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.6 MB

Release files / topo_tools-0.9.0.tar.gz

Download URL topo_tools-0.9.0.tar.gz
Size 8.4 MB
Tags Source
SHA-256 checksum
How to use checksums
bc0f29ad4c331274038931643f9bf4807a827bfb58759ba6e181c16d51d5eca3
BLAKE2b-256 checksum
How to use checksums
225d986e4ebc2f38d486735d9e7199ac1e63a9acdbae2e171ec21c15fd4af708
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 28, 2026.

Transparency log

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

Download URL topo_tools-0.9.0-py3-none-any.whl
Size 179.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2caf1e5eac7b840555f3026f3fa10b20a5d9c75732e0055bc9a3caec5006a683
BLAKE2b-256 checksum
How to use checksums
7d63b8580b652b5ec030a05def008c69dd05e31a99625324fa5e4c354cf0b16e
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 28, 2026.

Transparency log

Security for topo-tools 0.9.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for topo_tools-0.9.0.tar.gz

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 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files Full provenance

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