Relation

From OpenStreetMap Wiki
(Redirected from Relationship)
Jump to: navigation, search
Available languages — Relation
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Baso Minangkabau · bosanski · brezhoneg · català · čeština · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · português do Brasil · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް
Mf Relation.svg

A relation is one of the core data elements that consists of one or more tags and also an ordered list of one or more nodes, ways and/or relations as members which is used to define logical or geographic relationships between other elements. A member of a relation can optionally have a role which describes the part that a particular feature plays within a relation.

Usage

Relations are used to model logical (and usually local) or geographic relationships between objects. They are not designed to hold loosely associated but widely spread items. It would be inappropriate, for instance, to use a relation to group 'All footpaths in East Anglia'.

Size

It is recommended to use not more than about 300 members per relation. If you have to handle more than that amount of members, create several relations and combine them with a Super-Relation.
Reason: The more members are stuffed into a single relation, the harder it is to handle, the easier it breaks, the easier conflicts can show up and the more resources it consumes at database and server.

Roles

A role is an optional textual field describing the function of a member of the relation. For example, in North America, east indicates that a way would be posted as East on the directional plate of a route numbering shield. Or, multipolygon relation, inner and outer are used to specify whether a way forms the inner or outer part of that polygon.

Types of relation Relation

Main article: Types of relation

Multipolygon

In the multipolygon relation, the inner and outer roles are used to specify whether a member way forms the inner or outer part of that polygon enclosing an area. For example, an inner way could define an island in a lake (which mapped as relation).

Bus route

A bus route might have a relation with type=route, route=bus and ref=* and operator=* tags. The first members in the route relation are the stop nodes, ordered in the way the buses travel along them. Then the ways are added. In PT v2 they form an ordered sequence, following the stop nodes. The ways don't get roles. If they form a continuous sequence this is apparent from the continuous line along them (in JOSM).

Other Examples

Tools

Navigation on Relations

Please list routing apps here, that are able to follow a relation route (like for pilgrimages)

  • No app known yet.

See also

Elements±
Node · Way · Area · Relation (members and roles) · Tag (key and value)