"Double entries" for certain buildings

Hi there,

I have a quick question regarding relation “8990774”, the Berliner Reichtstags Gebäude.

It appears to be the same one as “Reichstag Building (2201742)”. The same outer and inner ways. So, it’s the identical shape.

From what I can see the difference is that “8990774” – in conjunction with a few other ones – is forming a 3d shape of the Reichstag. The “2201742” relation is just a general simplified version, but carries all the information about the building (like address, etc.).

Since I convert the relations into 3d models automatically I end up with two geometries on top of each other with one hiding the other. While in this case I can easily delete the 2201742 relation manually I would like to find a general approach to avoid these problems. How can I tell that there are two entries describing the same building? Especially with thousands of buildings similar problems might occur, but stay unnoticed.

Both relations are “multipolygon = yes”, one is “building = government”, the other only “building:part = yes”. Neither relations seems to “know” about the other one. What’s the logic or syntax behind it? How can I automatically delete the one which is simplified and keep the other one?

Cheers and thanks for taking the time for reading and sharing your knowledge.
Thomas

Both relations represent polygons with holes. One is tagged as a building (building=government), the other as a building part (building:part=yes). This seems to follow the usual Simple 3D Buildings mapping convention.

As documented on that page, a building part belongs to the building area it is geometrically contained in. Following this rule, you can figure out that these two areas belong together.

It is possible to model such a relationship explicitly with a type=building relation, but that is optional except in cases that would otherwise be ambiguous. The majority of 3d-mapped buildings do not have such a relation, so your conversion should best be able to work without it.

Thanks for the information. The creator of one of the relations kindly replied to me too, telling me mainly exactly the same as you. I just thought that there would be some kind of tag which specifies that one is the 3d building, while the other is the outline, so that it would be simple to distinguish between both.

From what I can tell right now, insetting the building:parts and then check for the closest building surface would be the only way to come up with a logical connection between both relations. If the distance is 0 (query in 2d space), then the point/prim is within the outline of the other one. In this case the outline could be deleted in favor of the building:parts.

Hopefully it is that “easy” and I don’t make a mistake here. : )

Cheers
Thomas