Skip to content

fieldmaps/topo-tools-py

Repository files navigation

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. It ships four tools, usable from the CLI or as a Python package:

Tool What it does Usage
clean Detects and fixes gap/overlap defects in a single polygon layer; reports slivers separately for manual review. docs/clean.md
extend Fills gaps around a polygon layer (missing coastline, disputed areas, water bodies) with a Voronoi extension, producing full coverage. docs/extend.md
match Fits a finer child polygon layer into a coarser parent layer, grouping and extending each child to fill gaps within its own parent. docs/match.md
change Compares two versions of a polygon layer and classifies every unit as unchanged, renamed, modified, split, merged, created, or removed. docs/change.md

Installation

uv tool install topo-tools   # CLI (recommended)
uv add topo-tools            # Python library

Or with pip:

pip install topo-tools

Each linked doc above covers that tool's CLI/Python usage, options, and examples.

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.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

26 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages