From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Way
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 norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português 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 way.svg

A way is an ordered list of nodes which normally also has at least one tag or is included within a Relation. A way can have between 2 and 2,000 nodes, although it's possible that faulty ways with zero or a single node exist. A way can be open or closed. A closed way is one whose last node on the way is also the first on that way. A closed way may be interpreted either as a closed polyline, or an area, or both.

As of November 2018, OpenStreetMap contains over 540 million ways.

Types of way

Open way way

An open way is way describing a linear feature which does not share a first and last node. Many roads, streams and railway lines are open ways. Identifying the direction of a 'way'.

Closed way closed way

A closed way is a way where the last node of the way is shared with the first node with suitable tagging. A closed way that also has a area=yes tag should be interpreted as an area (but the tag is not required most of the time, see section below).

The following closed way would be interpreted as closed polylines:

  • highway=* Closed ways are used to define roundabouts and circular walks
  • barrier=* Closed ways are used to define barriers, such as hedges and walls, that go completely round a property.

Area area

Main article: Area

An area (also polygon) is an enclosed filled area of territory defined as a closed way. Most closed ways are considered to be areas even without an area=yes tag (see above for some exceptions). Examples of areas defined as closed ways include:

For tags which can be used to define closed polylines it is necessary to also add an area=yes if an area is desired. Examples include:

Areas can also be described using one or more ways which are associated with a multipolygon relation.

Combined closed-polyline and area

It is possible for a closed way to be tagged in a way that it should be interpreted both as a closed-polylines and also as an area.

For example, a closed way defining a roundabout surrounding a grassy area might be tagged simultaneously as :


Street as a vector

A one-way residential street, tagged as highway=residential + name=Clipstone Street + oneway=yes

  <way id="5090250" visible="true" timestamp="2009-01-19T19:07:25Z" version="8" changeset="816806" user="Blumpsy" uid="64226">
    <nd ref="822403"/>
    <nd ref="21533912"/>
    <nd ref="821601"/>
    <nd ref="21533910"/>
    <nd ref="135791608"/>
    <nd ref="333725784"/>
    <nd ref="333725781"/>
    <nd ref="333725774"/>
    <nd ref="333725776"/>
    <nd ref="823771"/>
    <tag k="highway" v="residential"/>
    <tag k="name" v="Clipstone Street"/>
    <tag k="oneway" v="yes"/>

The nodes defining the geometry of the way are enumerated in the correct order, and indicated only by reference using their unique identifier. These nodes must have been already defined separately with their coordinates.