Relation:boundary

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
Deutsch English Español Français 日本語 Русский
logo boundary
One example for boundary
Description
for grouping boundaries and marking enclaves / exclaves .
Group
Properties
Members help
  • Way - inner
  • Way - outer
  • Node - admin_centre
  • Relation - subarea
Statistics


boundary=* relations can be used for grouping boundaries and marking enclaves / exclaves.

  • In Germany, Ecuador, Colombia and The Netherlands, boundaries have been imported as type=multipolygon-relations.
  • In France, type=boundary with exclave/enclave/(none) roles and without subarea in the relation is used (please check FR:Relation:boundary).
  • Currently the most common way according to the real database is to tag according to the rules of multipolygons, but use type=boundary.
  • type=multipolygon as well as type=boundary (An administrative boundary can be definitively recognised through the existing boundary=* tag)
  • role=(blank),exclave for role=outer (note blank role is obsolete for multipolygons as well, but usually defaults to outer)
  • role=enclave for role=inner
  • role=admin_center for role=admin_centre
  • Note: Even if names differ, semantics are equal

Relations are used in order to:

Contents

Way Tags

Ways for borders will then only have boundary=administrative and the admin_level=* for the highest border (when a country, state, county are on the same way the admin_level would be 2). Old direction dependent tags like name:left=* / name:right=* can be removed.

Relation Tags

Key Value Discussion
type multipolygon / boundary in Germany, Ecuador, Colombia and The Netherlands, multipolygon is used (see talk page)
boundary=* administrative for a real boundary (sometimes in the middle of a river or 12 Miles away from coastline)
land_area administrative for coastline and real boundaries on land
name a name
admin_level the admin level

If you have a land-locked administrative area in the region you should set both: boundary=administrative and land_area=administrative. If the land_area is not the same as the boundary, make two relations, one with land_area=administrative and one with boundary=administrative.

Relation Members

Element Role Recurrence? Discussion
Way outer one or more The multiple ways that form the closed border
Way inner zero or more Enclaves of this border - the multiple ways that form the closed inner borders
Relation subarea zero or more Refer to relations of sublevel boundaries inside this administrative level.
Note : this role is optional, was not discussed, lots of people find it disruptive, its use in a number of cases may complicate editing boundaries and it hasn't been proved that it can help in something that wasn't allready possible with spatial queries.
Node admin_centre zero or one Node representing the administrative centre, usually a town, city or village (depending of the boundary level, see place=*)
Node label zero or one Node representing where to draw the label.
Way (blank) one or more Old, use outer instead
Way enclave zero or more Old, use inner instead
Way exclave zero or more Old, use outer instead

Note: All ways should form closed rings making the border. For not closed, linear border, see Proposal:Relation boundary segment.

Examples

Baarle Nassau is a good use case for this relation. It has exclaves in enclaves. The exclaves in the enclaves of Belgium would just be added as exclaves to the relation of the Netherlands, the dutch province Noord-Brabant and the village border.

Tagging examples
C is A's enclave and B's exclave:
<relation id="1">
  <tag k="type" v="boundary" />
  <tag k="boundary" v="administrative" />
  <tag k="land_area" v="administrative" />
  <tag k="admin_level" v="2" />
  <tag k="name" v="light green country" />
  <member type="way" id="AB" role="outer" />
  <member type="way" id="AC" role="inner" />
</relation>
<relation id="2">
  <tag k="type" v="boundary" />
  <tag k="boundary" v="administrative" />
  <tag k="land_area" v="administrative" />
  <tag k="admin_level" v="2" />
  <tag k="name" v="dark green country" />
  <member type="way" id="AB" role="outer" />
  <member type="way" id="AC" role="outer" />
</relation>
C is A's enclave and B's exclave.
D is an exclave of B, but not an enclave of A since it also shares a border with C:
<relation id="1">
  <tag k="type" v="boundary" />
  <tag k="boundary" v="administrative" />
  <tag k="land_area" v="administrative" />
  <tag k="admin_level" v="2" />
  <tag k="name" v="light green country" />
  <member type="way" id="AB" role="outer" />
  <member type="way" id="AC1" role="outer" />
  <member type="way" id="AC2" role="outer" />
  <member type="way" id="AD" role="outer" />
</relation>
<relation id="2">
  <tag k="type" v="boundary" />
  <tag k="boundary" v="administrative" />
  <tag k="land_area" v="administrative" />
  <tag k="admin_level" v="2" />
  <tag k="name" v="dark green country" />
  <member type="way" id="AB" role="outer" />
  <member type="way" id="BC" role="outer" />
  <member type="way" id="AD" role="outer" />
  <member type="way" id="CD" role="outer" />
</relation>
<relation id="3">
  <tag k="type" v="boundary" />
  <tag k="boundary" v="administrative" />
  <tag k="land_area" v="administrative" />
  <tag k="admin_level" v="2" />
  <tag k="name" v="purple country" />
  <member type="way" id="AC1" role="outer" />
  <member type="way" id="AC2" role="outer" />
  <member type="way" id="CD" role="outer" />
  <member type="way" id="BC" role="outer" />
</relation>
D is an exclave of B, but not an enclave of A since it also shares a border with C.

See Relation:multipolygon#Advanced_multipolygons for more examples!

Helping Tools

Personal tools
Namespaces
Variants
Actions
site
Toolbox