Description of the Spinalize Algorithm
- Date 20/07/2017.
- Author: Guillaume Touya
- Contact {firstname.lastname}@ign.fr.
Description of the algorithm
The spinalize algorithm collapses a polygon into a line based on a voronoï diagram of the polygon, keeping only the “spine” of the skeleton (the algorithm gets rid of the small edges of the skeleton). If several polygons are initially connected (i.e. they touch each other) their spine is also connected by the algorithm.
The algorithm is briefly described in two papers that can be found here and here.
Parameter name | Description | Type | Default value |
---|---|---|---|
lengthMin | minimum length to keep a segment in the spine of the skeleton | double (meters) | |
overSample | a step for the vertex oversampling performed before computing the Voronoï diagram | double (meters) | |
removeHoles | true if you want to remove holes prior to collapse | boolean | true |
Examples of generalization
When to use the algorithm?
The algorithm can be used to collapse thin areas into lines (e.g. rivers, hedges, taxiways). When the shapes of the areas are not very thin, or are very complex, the algorithm provides not very smooth lines, and a straight skeleton based collapse should be preferred.