straight-skeleton-geojson
2025

As part of recent experiments in visualisation and computational geometry, I have had need to calculate the 'straight skeleton' of a polygon. If you imagine shrinking a polygon, this is the set of straight line segments that the vertices of the polygon trace out as they move towards the middle of the polygon.

It turns out there aren't any great libraries for this in Typescript, so I took some existing code (originally ported from C#) and have been working on making it into a more robust fully-featured library. Still a work in progress, but I'm using it in my own projects at the moment.