Zh-hans:Key:layer

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public-images-osm logo.svg layer
Washington layers.png
组: 属性
用于这些元素
可用于节点可用于路径可用于区域可用于关系
常用组合
状态:实际使用

翻译之本条目的英文页,以英文为准,如果您确定英文内容错误,而将正确的内容放在了本条,请删除此句话。

layer标签是表述路口或重叠的事物间垂直关系的众多方法之一。只有在道路交叉、对象重叠时,layer值表述的垂直关系才是有效的。 将道路在他们的交叉点交叉会破坏layer定义的垂直关系。 layer不适合用于定义紧靠、相邻、较远的元素或区域的垂直关系。把他(layer)用于较长的道路会不可预知的影响(经常是破坏)视野外较远的点。

使用-5到5的值,不要使用0。 道路以桥的方式通过其他道路时,将有较大的layer值,道路以隧道的形式从其他道路底下通过时,将有较低的layer值。没明确layer值的道路,默认layer值为0.

除了一些例外情况,layer=*way 道路上使用时,只与 tunnel=*, bridge=*, highway=steps, highway=elevator, covered=*indoor=yes之一结合。 对于 area 区域,它可以与像 man_made=bridge, 特殊类型的建筑物building=* 以及类似的标签结合使用.

建筑中的道路,或者有类似结构,如多层停车场,购物中心,机场,车站,包含多层的桥梁、道路等大多应该用level=*,而不是用layer来描述。

Layer不能反映没有直接交叉或重叠的对象之间的相对或者绝对的高度差异信息。不能用layer值的改变来表示海拔上的改变。海拔仅为几英尺的桥梁layer为1,而海拔为8848米的珠穆朗玛峰的layer值却为0。


layer值为负不表示对象位于地下,如需表示位于地下,用location=undergroundele=* 能表明对象的海拔高度。

一些其他标签能明确的或者通过内置的假设来建立或修改垂直关系,例如 level=*, location=*, covered=*, highway=steps, aerialway=*, power=line, waterway=dam

指南

主要的指南:

  • 在0 layer的设施通常不应有layer标签。
  • 不要使用layer=-1来隐藏关于道路交叉或者重叠的警告。要么正确地修复,要么留下容易被发现的警告以便他人修复。
  • 给道路可能/实用的最短的部分设置tag。为了简化,很长的高架桥或隧道全长可以被标记为合适的单一值,但有时为了适应复杂的交叉情况,沿着设施调整layer信息会更好。
  • 用合适的最小layer值。只有在一座桥跨越layer值已经为1的设施时layer设为2;类似地,只把layer=-2用于从另一个隧道下面穿过的隧道。为了方便,一些较高的值经常局部地为很长的桥或地下网络(假设他们在这个区域高于/低于其他大多数的路口或对象)使用或保留。
  • 当道路在不同层次上穿过时,只把layer=*用于有桥梁/隧道属性的道路。只有有tunnel=*, bridge=*, highway=steps, highway=elevator, covered=*标签/属性之一的道路可以使用layer标签,铁路、水路也是同样的道理。
  • 对于复杂的交叉点,经常需要截断道路以改变其layer,从而确保交点的垂直布置被精确表述。
  • 不应该对整条河流和溪流使用layer=-1,只有交叉点应该改像其他交叉点一样使用桥梁、隧道、layer。被覆盖的水路需要使用covered=yes标签,这样会被渲染成它好像在其他东西下面。当铁路和水路在同一层是,你可以使用ford=*
  • 电力线(power=line)一般不需要使用layer标签,假设它一直高于其他的物体,除非用layer值明确声明。可以使用location=overheadlayer=*可以用于电线交叉。
  • 一些其他的事物像man_made=pipelines, 也可以适当地使用location=overhead, location=overgroundlocation=underground 而不是使用layer=*。这简单的表明这些事物在空中或被掩埋,而不是假设实际的高度信息(这些信息一般不是对管道无用)。
  • 虽然一些地图渲染器和质量保证服务(一种帮助编辑者分析地图数据bug、错误的工具,这些bug、错误包括——道路交叉、道路未命名等)假定桥和隧道分别在+1层或-1层,最好明确指出所有桥梁、隧道的layer。

记住一个特殊的路口是否需要需要作为桥梁或隧道打标签是有争议的,特别是距离上层道路较远时。一般穿过隧道的路较长较黑,相反桥下的道路一般较短,也没那么黑。GDF标准使用术语'brunnel'概括两种情况。


需要避免的事情

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.

Examples

Layers used well for an interchange and for railways
This layers view of Washington using ITO Map shows how elements are correctly organised with elements that pass over other elements using layer 1 (red) unless it is necessary for them to to use layer 2 (orange). Some elements are using layers -1 or -2 as appropriate.
Confusing use of layers along a canal and railway
This view of the Grand Union canal in the UK shows incorrect use of layers. The canal switches from surface (no layer) to layer -1 (dark blue) to layer 2 (orange) for no reason. Bridges and tunnels are using higher layer numbers than necessary and some don't have layers at all. A point where a stream and footpath pass under the canal in a tunnel are shown at the same layer as the canal (layer -1 as it happens). A car park and collection of tracks in the village are shown at layer=-1 - no layer tag is needed given that they are neither below nor above other mapped objects.
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.

Examples

  • this bridge was drawn correctly despite having layer=-1 while the waterway and riverbanks have an implicit layer=0. The layer error was fixed in 2015-09.

See also

References