You are not logged in.

#1 2013-11-07 15:28:54

j3d
Member
Registered: 2013-05-07
Posts: 53

[S3DB-dev] roof lines by skeleton for non-rectangle buildings

As some of us experimented with a straight-skeleton approach to create complex roof lines I think we need a common way to decide when it should be used. Currently what I do is compare the area of the outline with the oriented bounding box: Skeleton is used when 'area of obb > area of outline * 1.2' or when the outline contains holes - so this is pretty arbitrary smile

I think it would be good to have a tag like roof:orientation:multi=yes when a skeleton interpretation for the roof is applicable.

Last edited by j3d (2013-11-07 15:30:10)

Offline

#2 2013-11-18 13:24:56

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: [S3DB-dev] roof lines by skeleton for non-rectangle buildings

I'm using straight_skeleton when polygon is not flag with "roof:orientation=across" as i didn't find any smart solution for that.

This is still a work in progress so it can't be seen in F4-map for now but i'm quite happy with the results and hope to release it soon.

Edit: I removed the test for polygon with more than 5 points and polygon with at least 1 hole as it often leads to strange result

Last edited by cmif4 (2013-11-18 17:33:23)

Offline

#3 2013-11-25 13:58:18

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: [S3DB-dev] roof lines by skeleton for non-rectangle buildings

We released the straight skeleton code this morning (it is not fully stable but we need feedback)

Paris les Invalides:
http://map.f4-group.com/#lat=48.8562788 … hi=-47.842

Berlin (some spot with many gambrel roofs):
http://map.f4-group.com/#lat=52.5295876 … .phi=5.443

Offline

#4 2013-11-25 14:40:48

marek kleciak
Member
Registered: 2010-10-11
Posts: 8,417

Re: [S3DB-dev] roof lines by skeleton for non-rectangle buildings

Good job guys!

Offline

#5 2014-04-04 10:04:44

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: [S3DB-dev] roof lines by skeleton for non-rectangle buildings

I'm still working on straight skeletons and i ended up with roof:orientation as the best candidate to decide to use skeleton or not:

tag orientation is not present -> compute and use the straight skeleton algorithm.

roof:orientation=across -> straight skeleton can't be computed as it doesn't make sense, compute minimal oriented OBox and use the smallest edge as ridge.

roof:orientation=along -> the mapper knows that the roof has a single straight ridge along the building, compute minimal oriented OBox and use the longest edge as ridge.

@j3d & @Kendzi what do you think about tweaking our engines to match this idea to get similar behavior ?

Offline

#6 2014-04-07 20:21:12

kendzi
Member
Registered: 2008-08-20
Posts: 250

Re: [S3DB-dev] roof lines by skeleton for non-rectangle buildings

I'm using very similar algorithm. In short:

* Is tag direction -> Square like
* Is tag orientation -> Square like
* Has holes -> Skeleton like
* Oriented bbox area greater 120% of polygon area -> Skeleton like
* Else Square like

Offline

#7 2014-04-08 08:28:15

cmif4
Member
From: Paris
Registered: 2013-06-10
Posts: 121
Website

Re: [S3DB-dev] roof lines by skeleton for non-rectangle buildings

Great, i'll match your behavior in F4Map.

But i won't base the detection on hole because when we remove parts from the outline it generates holes (for example when there are parts representing chimney or dormers).

Offline

Board footer

Powered by FluxBB