Zh-hant:Key:layer

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public-images-osm logo.svg layer
Washington layers.png
描述
用於標記兩個相交圖徵的垂直關係。 Edit or translate this description.
組: Placement
用於這些元素
可用於節點可用於路徑可用於區域未指定是否可用於關係
意義
常用組合
維基數據
狀態:習慣使用

layer=*標籤是描述相交或重疊圖徵垂直關係的方法之一。layer值的垂直排序只適用於精準位置(不含節點)上的相交路徑或重疊物件。。

在路徑交會處加入共用的節點將破壞layer設置的垂直排序。

Layer不適合定義相鄰、周遭、遙遠元素或區域的垂直關係。運用於長路徑時,可能在可見的編輯區域外,對路徑交會處造成無法預期的影響(通常會破壞垂直關係)。

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

路徑從上方穿越帶有橋梁標籤的路徑,將擁有更高layer的值;路徑從下方穿越帶有隧道標籤的路徑,將擁有更低(常為負數)layer的值。無特定值的路徑假定為layer=0

除了一些例外,way路徑的layer=*應該只與tunnel=*bridge=*highway=stepshighway=elevatorcovered=*indoor=yes配合使用。area區域的layer=*應該只與man_made=bridge、特定種類的building=*或其他類似標籤配合使用。

建築(或像似結構,如多層停車場、購物中心、機場、鐵路、建築內多層橋梁及道路等)內的路徑大部分應該以level=*描述,而非layer=*

layer完全不提供無相交或重疊物件的相對高度差、絕對高度差資訊。不應使用layer的變化指定高程的變化。只有海拔數公尺的橋樑仍為layer=1,海拔8848公尺高的珠穆朗瑪峰仍為layer=0

負數值不應該用於位於地下的物件,請改用location=underground

ele=*可以用於指定海拔高度。

其他可以透過特定值或潛在預設建立或修改垂直關係的標籤如下:level=*location=*covered=*highway=stepsaerialway=*power=linewaterway=dam等。

指南

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.

範例

layer良好運用於交流道、鐵路。
使用ITO Map呈現的華盛頓layers預覽展示元素如何正確的排列,上方穿越其他路徑的路徑使用layer=1(紅色),必要時使用layer=2(橘色),並適當使用layer=-1layer=-1
layer運用於交流道。
使用 Layer checker繪圖風格的JOSM編輯器中的layer範例。
Confusing use of layers along a canal and railway
英國的大聯合運河展示layer的錯誤運用,運河不合理地從地表(無layer)變換至layer=1(深藍)及layer=2(橘)。橋梁與隧道使用高於必要的layer值,某些路段又完全沒有layer。

下方穿越運河隧道的溪流與人行穿越道,呈現與運河相同的layer(layer=-1)。

聚落內的停車場與集合通道呈現layer=-1,應為無layer,因為他們既非低於或高於其他繪製的物件。

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.

延伸閱讀

References