--- id: shapely-polyskel version: "0.1.2" license: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) license_treatment: copyleft maintenance: aging --- # shapely-polyskel — Implementation of the straight skeleton algorithm as described by Felkel and Obdržálek in their 1998 conference paper Straight skeleton implementation. License: copyleft · Maintenance: aging · Downloads: 73.6K/mo ## What it is and what it does shapely-polyskel implements the straight skeleton algorithm, a geometric technique that computes a medial axis—a set of line segments representing the 'skeleton' of a polygon. It is a fork of an earlier implementation and is based on the 1998 Felkel and Obdržálek algorithm. The package works with shapely Polygon objects and accepts polygons with holes, returning skeleton edges, source points, ridges, and sinks. The algorithm is dated and the implementation does not attempt to fix known correctness issues; it works reasonably well for real-world inputs like country contours and floor plans but may fail on certain edge cases. It depends on shapely for geometry representation and euclid3 for vector math. The package is in beta status with low install friction, though maintenance is aging. Use it for: - Generate roof structures from building footprints or floor plans. - Compute medial axes for polygon simplification or offset operations. - Analyze country or region contours to extract skeleton features. - Create layout networks or centerline representations from polygonal shapes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Computes the straight skeleton of a polygon, a geometric medial axis useful for floor plans, building contours, and roof generation. Yes, if you need straight skeleton computation for real-world geometric problems like floor plans or building contours and can tolerate the algorithm's known limitations. No, if you require a modern, fully correct implementation—the author recommends Stefan Huber's research for that. The low install friction and lack of security issues make it safe to try, but verify the algorithm's behavior on your specific inputs first. ## Install pip install shapely-polyskel uv add shapely-polyskel poetry add shapely-polyskel ## Installing shapely-polyskel Before you install: Low friction; pure Python wheel with only two runtime dependencies (euclid3 and shapely). Maintenance is aging—last release was 586 days ago and the repository has minimal activity (3 stars), though it remains unarchived and the implementation is acknowledged as dated and imperfect for certain inputs. License in practice: Licensed under LGPLv3 (copyleft). You may use and modify the package freely, but derivative works and combined distributions must also be licensed under compatible terms and include source code availability. Quickstart: from shapely_polyskel import skeletonize rectangle = [(40, 40), (40, 310), (520, 310), (520, 40)] skeleton = skeletonize(polygon=rectangle) Requires Python 3.10 or later. Verify before relying: - Whether the implementation's known limitations (acknowledged as 'a bit crap' and incorrect for certain polygons) affect your specific use case. - Performance characteristics and scalability for large or complex polygons. ## Package facts - License: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) (copyleft) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 73.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags straight skeleton algorithm, polygon medial axis, geometric skeleton computation, floor plan analysis, polygon offset and thinning, computational-geometry, polygon-processing [View on SkillFed](https://skillfed.io/packages/shapely-polyskel) · [View on PyPI](https://pypi.org/project/shapely-polyskel/)