-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Straight skeleton algorithm fails on complex building footprints #1
Comments
I would love to work with you on this issue. I have some custom three-js geometries that render a few different roof shapes given their outlines: https://github.com/Beakerboy/Threejs-Geometries A hipped roof is next on my list. I’ll review your straight skeleton implementation and see what I can figure out. |
@Beakerboy Good luck! My hipped roof implementation is located in HippedRoofBuilder.ts, you can take a look at it. Overall, there's nothing complicated, it's pretty easy to render a hipped roof once you have a straight skeleton generated. |
Just for adding another example: https://streets.gl/#53.55148,10.00444,45.00,0.00,473.43 |
I've switched to a much more robust CGAL straight skeleton implementation that works much better with complex OSM polygons. |
Works really well for most situations, nice overall improvement! Thank you for that elaborate fix. |
To generate geometry for hipped and similar roof shapes in runtime this project uses a straight skeleton algorithm implementation ported from reinterpretcat's C# implementation: https://github.com/StrandedKitty/straight-skeleton
It seems like the algorithm tends to fail on buildings with a lot of right angles and holes. Basically, there are three types of failures:
To temporarily fix this problem I've implemented a fallback to the flat roof shape, but it only works for the first two cases which are easily detactable.
Though I don't know if looking into this is worth the effort.
The text was updated successfully, but these errors were encountered: