Knot ships inside Shoelace

// topology engine

The topology engine under Shoelace's Data Health tools: dissolves, overlays and coverage repair on large, messy polygon data.

// callable from Shoelace, C# and Python
← there(ish)

What it does

Dissolve

// all together, or by group
  • Merge every polygon in a layer, or merge by the values of a field
  • Built for real-world data, not textbook polygons

Overlay

// two layers at once
  • Intersect, union, erase, clip, identity and symmetrical difference
  • Tabulate intersection: how much of each feature falls in each zone
  • Count overlapping features

Coverage repair

// the work behind Data Health
  • Find gaps and overlaps between neighbouring polygons
  • Make invalid geometry valid
  • Eliminate slivers into their neighbours
  • Repairs rebuild shared boundaries exactly, with no new slivers

And the rest of the toolbox

// the everyday operations
  • Simplify, keeping shared edges shared
  • Buffer, with or without a dissolve
  • Polygon neighbours
  • Lines to polygons, and shortest paths on a line network

Exact by design

// one grid, one arrangement
  • Every operation snaps to a fixed grid, 1 mm by default
  • All the inputs are worked on together, as one planar arrangement
  • Results are valid, consistent between neighbours and identical run to run

Use it where you work

// Shoelace, C# and Python
  • Inside Shoelace's Data Health tools, with nothing to install
  • A C# API for .NET applications
  • A Python package built as a native library: no .NET needed on the machine

// Limits: 2D only (Z and M are dropped); neighbours means shared edges, not single-point touches.

Measured against NTS and GEOS

// Treadmill, our benchmark suite, with a correctness check on every operation
  • Three engines: Knot, NetTopologySuite 2.5 and GEOS 3.14 (through GDAL)
  • The operations above: dissolve, coverage dissolve, overlay, validity and repair, simplify
  • Real, open data: 518 ABS mesh blocks, four local government areas and 5,412 OpenStreetMap building footprints in Perth, plus synthetic edge cases
  • Like for like: every engine on one core; Knot's multi-core time is reported separately
  • Checked, not just timed: every result is compared with the other engines' to 0.1 mm, because a faster answer that differs is a different answer
  • All of it published: including the cases where Knot is slower

// Results: published here after the first full benchmark run.

// Get in touch

Knot ships inside Shoelace. Want Knot on its own in your own code, from C# or Python? Talk to us.

matt@there-ish.com