Layer

From OpenStreetMap Wiki
Jump to: navigation, search
Disambig gray.svg
This disambiguation page lists articles associated with the same title.
If an internal link led you here, you may wish to change the link to point directly to the intended article.

A layer within OpenStreetMap can have different meanings, depending on context.


Viewing a slippy map

Map Layers

When viewing an interactive slippy map (e.g. on osm.org) you can often choose different Map Layers. They may show different views of the same dataset, or they may be placed on top of each other to show content from different data sources. Many providers offer very specific views on the OSM data, see the List of OSM-based services.

As Tag

Different layer values

When editing, the layer=* tag is used to describe vertical relationships between crossing or overlapping elements, e.g. a bridge over a street. Specific layer views are available.

For describing different floors within a building or multilevel parking decks use level=*.

Within Editors

Layer Panel in JOSM

Usually a layer contains a related (but different!) set of data. As an example, in JOSM you can determine which layer gets displayed on top of which other layer while editing (or to not display them at all). There are layers for:

  • different sets of OSM data
  • GPX tracks and markers
  • pictures from several WMS'es you can trace over
  • various plugins

Within Renderers

Rendering a map view

According to a post [1] there are: about five different sets of nested "layers" concepts in the mapnik rendering setup.

OSM layer tagging is converted by Osm2pgsql into a z_order parameter in the PostGIS/PostgreSQL database. It has been experimentally determined that this parameter for a polygon is set to 10 times the OSM layer value. When retrieving planet_osm_polygon data you can use an "order by z_order" instruction to ensure layers are rendered in the correct order on the same spot. This is not an alternative to using Relation:multipolygon to cut holes in geometry where a feature does not apply.