From OpenStreetMap Wiki
Jump to: navigation, search
可用的語言 — Key:layer
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 беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް
Public-images-osm logo.svg layer
Washington layers.png
用於標記兩個相交圖徵的垂直關係。 Edit or translate this description.
組: Placement




值的使用範圍介於 -5 至 5,不應該特別使用 0 值。









Here are the main guidelines:

  • Features at layer 0 should not normally have a layer tag.
  • Do not use layer=-1 to hide warnings about crossing or overlapping ways. Either fix them properly or leave the easily visible warning so that others can fix them.
  • If a waterway is visible on the satellite image it is most likely not layer=-1.
  • Tag shortest possible/practical sections of ways. Long viaducts and tunnels can be tagged with a suitable single value for their entire length for simplicity although it may sometimes be better to adjust the layer along its length to accommodate more complicated crossings.
  • Use the smallest suitable layer value. Only use layer=2 for a bridge that passes over a feature that is already at level 1; similarly only use layer=-2 for a tunnel that passes below another tunnel. For convenience some higher values are often locally used/reserved for very long bridges or underground networks where it is assumed that they are above/bellow most other crossings/objects in the area.
  • When ways are passing on different levels apply layer=* only to the way which also has the bridge/tunnel attribute. Only ways with one of the tags/attributes tunnel=*, bridge=*, highway=steps, highway=elevator, covered=* should be tagged with the layer tag, similar for railways and waterways.
  • Within complex junctions it is often necessary to break ways to change the layer and thereby ensure that the vertical arrangement of intersections is accurately described.
  • Rivers and streams should not be tagged with layer -1 along long sections of their length, crossings should be tagged like other crossings with bridges, tunnels and layer. Waterways that are covered may be tagged with covered=yes and are generally rendered as if they flow underneath built features. Where a highway is at the same level as a waterway, you can add ford=*.
  • Power lines (power=line) do not normally need to be tagged with a layer and are assumed to float above all other features unless a layer value is used to indicate otherwise. The location=overhead can be used and layer=* may be used for example when two power lines cross.
  • Some other features like man_made=pipelines can also be appropriately tagged by using location=overhead, location=overground or location=underground instead of layer=*. This simply indicates that they are in the air or buried, without providing any actual relative height information which is frequently not easily available for buried pipelines. layer=* may be used for example when two pipelines lines cross where the information is known.
  • Although some map rendering and quality assurance services assume that bridges and tunnels are at layers +1 and -1 respectively, it is better to explicitly state the layer for all bridges and tunnels.

Note that there can be some ambiguity about whether a particular crossing should be tagged as a bridge or as a tunnel, particularly where the distance under the upper way is long. In general the way through a tunnel tends to be longer and darker, whereas the way under a bridge tends to be shorter and less dark. The GDF standard uses the term 'brunnel' to cover both features.

Things to avoid

Here are some common examples of how not to use the layer tag:

  • Landuses, such as parks and woods should not normally be tagged with a layer and data consumers may freely ignore such layer tags. The exception to this rule is where a landuse is indeed above another landuse.
  • Roads, railways, waterways etc. should not be tagged with a layer just because they are raised up on an embankment or are in a cutting - use embankment=* and cutting=*, respective waterway=ditch for this purpose.
  • Beware that the combination of layer on a way crossing areas with a different layer is not defined in many cases and likely to cause unforeseeable effects. As an example, a road or a river which is tagged with layer=-1 may not be rendered when crossing a landuse=forest with an implicit layer=0 tag - rendering will be inconsistent between different renderers. Such combinations are only defined when used with additional tags such as bridge or tunnel.
  • An island (place=island) in a lake (natural=water) should not be tagged as layer=1, nor should a clearing in a wood (clearing in a wood is not hovering above trees). To ensure that the island or clearing renders properly use multipolygon.
  • Floors within a building should be tagged with level=* rather than layer.
  • Rivers and streams should not be tagged with layer -1 along their entire length or long sections as it makes harder to detect missing bridges for roads passing over waterways.
  • Positive values do not need a '+' sign. Use 'layer=1' rather than 'layer=+1'.
  • Using negative values to describe something to be underground. Use location=underground for this purpose.


使用ITO Map呈現的華盛頓layers預覽展示元素如何正確的排列,上方穿越其他路徑的路徑使用layer=1(紅色),必要時使用layer=2(橘色),並適當使用layer=-1layer=-1
使用 Layer checker繪圖風格的JOSM編輯器中的layer範例。
Confusing use of layers along a canal and railway



Golf course layers.png
Layer tags used incorrectly for woods and a golf course. The woods are on layer 2, a golf course on layer -1 and a common on layer -2. These features are all at ground level and will render correctly without layering.

Data consumers

For technical reasons renderers typically give the layer tag the least weight of all considerations when determining how to draw features.

A 2D renderer could establish a 3D model of features, filter them by relevance and visually compose the result according to 3D ordering and rendering priorities. layer=* does only affect the 3D model and should have no influence whatsoever on relevance filtering and rendering priorities (visibility).

The 3D modeling is mostly determined by the natural (common sense) vertical ordering of features in combination with layer and level tags approximately in this order:

  • natural/common sense ordering: (location=underground, tunnel) under (landcover, landuse, natural) under waterways under (highway, railway) under (man_made, building) under (bridge, location=overground, location=overhead)
  • layer tag value:
    • layer can only "overrule" the natural ordering of features within one particular group but not place for example a river or landuse above a bridge or an aerialway (exception: use in indoor mapping or with location tag)
    • layer tags on "natural features" are frequently completely ignored
  • level tag value: considered together with layer - layer models the gross placement of man made objects while level is for features within such objects.


  • this bridge (data attached to josm ticket) was drawn correctly despite having layer=-1 while the waterway and riverbanks have an implicit layer=0. The error was meanwhile fixed and JOSM validator improved to spot such situations.