User:MasiMaster/Multipolygon relation proposed edit
![]() |
frameless|center|200px |
Description |
---|
The multipolygon relation is used to represent complex areas. ![]() |
Group: Properties |
Members |
|
Status: de facto |
Tools for this tag |
|
Relations of type multipolygon are used to represent complex areas.
Simple areas are mapped in OSM by creating one circular way and tag it with something that suggests an area rather than a circular way. For example, a circular way tagged landuse=forest will be assumed to be an area, while a circular way tagged junction=roundabout will not.
However, this model only works for areas the outline of which consists of one single way, and which do not have holes. Any area that is more complex than that (e.g., because its outline consists of several ways joined together, or because the area consists of multiple disjunct parts, or has holes) requires a multipolygon relation.
It is suggested to also use type=multipolygon (and not type=boundary) for boundary relations if you want applications to use area-building rules (i.e., connecting outers to form rings, excluding enclaves, etc.) A boundary relation is easily spotted by its boundary=* tag; no need to use type=boundary.
In short, a multipolygon relation can have any number of ways in the role outer (the outline) and any number of ways in the role inner (the holes), and these must somehow form valid rings to build a multipolygon from.
Tags
Key | Value | Explanation |
---|---|---|
type | multipolygon | Tells applications to use area-building rules on the members. |
Members
Usage
The intended use of multipolygons is this:
- Tags describing the multipolygon (e.g., landuse=forest) should go on the relation. The outer way(s) should be left untagged, unless they describe something in their own right. For example, a forest could be delineated by naturereserve-border, in which case the outline would be tagged with the naturereserve tag, because the lake inside the forest belongs to the naturereserve, but not to the forest.
- If the inner way represents something in itself (e.g., a forest with a hole where the hole is a lake), then the inner way may be tagged as such.
- Otherwise the inner way(s) should be left untagged.
- The direction of the ways does not matter.
- The order of the relation members does not matter (but properly sorted member lists can help human editors to verify completeness).
- Generally, the multipolygon relation can be used to build multipolygons in compliance with the OGC Simple Feature standard (http://www.opengeospatial.org/standards/sfs). Anything that is not a valid multipolygon according to this standard (e.g., polygons with intersecting rings) should also be considered an invalid multipolygon relation, with the notable exception of touching inner rings (see below).
Examples
One outer and one inner ring
One outer and two inner rings
Multiple ways forming a ring
Two disjunct outer rings
Two disjunct outer rings and multiple ways forming a ring
Complex combination of all advanced features
Island within a hole
Touching inner rings
More examples
More examples are on following pages:
Tagging dispute
There is a big disput in german-forum about using multipolygons.
Some mapper use multipolygons to create simple areas (without holes), uses highways to form an area/multipolygon and/or using multiple ways to form an outer/inner-ring.
This is correct by following the rules from this page. On the other hand there are many users who think the scheme is to lax. They want using multipolygons only for areas with holes and split the outer/inner-ring only for really huge areas and administrative-borders and don't use highways to form the outer/inner-rings.
Some of their arguments are:
- difficult to edit, espacially for new users
- less computing power (multipolygons need much more computing power than simple areas)
- view in editors are too complicated
- OSM-rule KISS - Keep it simple stupid
Helping tools
Here are some tools that may help you to edit areas and multipolygons:
- Follow line: F-Key
- ConturMerge Plugin (JOSM)
Tagging
- It is suggested to apply all tags which describe the area to the relation, and not to the ways. In many cases this may result in completely untagged ways.
- Implementation for compatibility (only for software developers):
- Drawing style is taken from the tagging of the relation itself.
- If relation is not tagged, the drawing style of outer ways is used.
- If the outer styles mismatch or no style is found it is considered an error.
- Inner tagging leads to inner drawing. If inner tagging style equals outer style (an old method) the inner style should be handled as empty.
Detailed tagging
This section is for software developers, users should add tags always to relation and not to outer ways!
The tagging for this multipolygon relation can be done in quite a few ways. Here is a list of cases, problems and proposed solutions:
- There is more than one outer way:
- The relation has tags
- Use the relation tagging. Ignore anything on the ways.
- The relation has no tags, but one or more constituting outer ways have an identical set of tags
- Valid data, take the tags from the tagged segments and apply them to the complete outer way.
- The relation has no tags, and constituting outer ways are tagged differently
- This is a problem situation with undefined results.
- There is more than one inner way:
- One closed way (consisting of one or more segments) has no tags but another one has tags.
- The way without tags is rendered as a hole, the way with tags according to its tags.
- Different closed ways with different tags.
- Each hole is rendered on its own according to its tags.
- One closed way (consisting of two or more segments) where the segments have different tags.
- If some segments have no tags at all just use the tags from the other segments. If the segments have different behaviour is undefined (as for "outer" ways).
Rendering
- JOSM is able to render these advanced multipolygons since revision 1203
- Osmarender (T@H) supports advanced multipolygons
- The mapnik rendering configuration at www.openstreetmap.org does not fully support "advanced multipolygons" (But mostly)
- Fully supported by mkgmap since revision 1497
- [GpsMid] supports at least a great majority of advanced multipolygon features
- There is a suggested Algorithm for processing multipolygons.
Potlatch example

In Potlatch, roles for a multipolygon relation should be assigned to the relation member itself, and not as separate tags. When in edit mode, select the relation member and put inner or outer in the box on the same line as where it says multipolygon.
Helping Tools
- Relation Check
- OSM Inspector has support for multipolygon checks
See also
- See The Future of Areas for some discussions on how to improve area handling in OSM.