Suggestion to add skeleton algorithm module #2718
Replies: 8 comments
-
Interestingly, this algorithm can be used for computing road centerlines. [satellite imagery] => [opencv detected polygon vectors] => [polylines] |
Beta Was this translation helpful? Give feedback.
-
This would actually be pretty grand. To my knowledge there is now Straight Skeleton JS Library out there, I've been using SFCGAL on PostGIS to do this. |
Beta Was this translation helpful? Give feedback.
-
Noting here for reference, floating point weighted skeleton (we want straight skeleton) implementation: http://twak.blogspot.com/2010/06/weighted-straight-skeleton-source.html twak has been working on this stuff for several years, and his site is a great resource:
|
Beta Was this translation helpful? Give feedback.
-
This pySkeleton implementation merely works for screen coordinates: http://vision.mas.ecp.fr/Personnel/teboul/pySkeleton.php And this is the PostGIS extension I have been working with lately: |
Beta Was this translation helpful? Give feedback.
-
There's also https://github.com/migurski/Skeletron |
Beta Was this translation helpful? Give feedback.
-
@gmaclennan Skeletron no longer uses a straight skeleton, but I was able to dig through the repo and find a commit where it still had the code around. No idea how robust the implementation is, but it might be a good reference. https://github.com/migurski/Skeletron/blob/74103e06c726f953db50b9dad98718d4bff05cdf/Skeletron/__init__.py |
Beta Was this translation helpful? Give feedback.
-
nice, love the different approaches. |
Beta Was this translation helpful? Give feedback.
-
This is what I'm looking for. In particular right now I have some polygonal data for the position a new pipeline will be in, and the things I need to do with this data would be far easier if it were a line rather than a polygon. |
Beta Was this translation helpful? Give feedback.
-
straight skeleton algorithm, which forms the basis for most polygon offset curve algorithms
https://www.cgal.org/UserWorkshop/2004/straight_skeleton.pdf
The general idea is this:
CGAL implementation
Beta Was this translation helpful? Give feedback.
All reactions