This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to tag buildings that are multipolygons?

2

The multipolygon wiki page talks about using ways and tagging the relation instead of the members. As I read it, this would mean that a building with internal spaces would be composed of multiples ways (inner and outer) and then the whole relation would be tagged as a building.

  1. Is that right?
  2. If so, I don't understand how to tag the relation a building.
  3. In contrast, what I actually find are cases of a building that is given the role of outer in a relation that makes up a MP, along with ways that play the inner role. These things seem to render correctly.

Here's an example of a relation I just did:

https://www.openstreetmap.org/relation/4096469

Here's how it's rendered:

https://www.openstreetmap.org/#map=19/41.89464/12.49875

That looks right, even though it's not done according to the wiki page (again if I read it correctly).

Thanks for any help.

asked 08 Oct '14, 18:06

Eponymous's gravatar image

Eponymous
41113
accept rate: 0%


One Answer:

2

The tags should be on the OSM object representing the building as a whole, which would be the multipolygon relation in your example. If you didn't do that, you'd have a multipolygon relation describing some unknown object. Data users can't necessarily use the tags of the members to determine what the relation represents.

Also, keep in mind that something can appear to render correctly even if the underlying data is incorrect. Getting the underlying data correct is the most important, because OSM data is used for more things than just image rendering.

answered 08 Oct '14, 18:51

alester's gravatar image

alester
6.6k266100
accept rate: 28%

1

OK, so here's what I did (which wasn't clear to me before):

  1. Made the three lines.
  2. Created a multipolygon relation.
  3. Added the tag "building=yes" to the relation.

Previously I was trying to change the type of the MP.

(08 Oct '14, 19:05) Eponymous

Yep, it looks correct now.

(08 Oct '14, 19:57) alester

Source code available on GitHub .