Key:area

From OpenStreetMap Wiki
(Redirected from 2D routing)
Jump to navigation Jump to search
Public-images-osm logo.svg area
Mapnik area pedestrian.png
Description
Indicates whether a closed way represents an area or just a circular way. Show/edit corresponding data item.
Group: properties
Used on these elements
should not be used on nodesmay be used on waysmay be used on areas (and multipolygon relations)should not be used on relations (except multipolygon relations)
Documented values: 2
Useful combination
Status: approvedPage for proposal

The area=yes tag indicates that a closed way represents an area (polygon); conversely, area=no indicates that it represents a linear feature (polyline).

This tag is seldom necessary, since the nature of closed ways is inferred from other tags (for example, natural=water encloses a water area, while waterway=* represents a linear water feature such as a ditch). However, some tags can be applied to both areas and lines; in those cases, explicitly specifying area=* resolves the ambiguity on closed ways. For example, leisure=track, sport=running, area=no is just a circular running track.

The tag is meaningless on features other than closed ways. Also, a closed way only tagged with area=yes and name=* means essentially nothing, although it might be rendered on maps by accident; use place=* to denote a named feature. Areas can also be described using one or more ways and a relation:multipolygon.

Summary

The following closed ways should be treated as linear features:

  • barrier=*, for thicker hedges or walls or detailed mapping defined using an area add area=yes
  • highway=*, see 'Highway areas' below for more details
  • This list is probably incomplete - please add other cases

Closed ways are assumed to be areas in most other situations, including:

Mappers frequently use both "areal" and "linear" tags on the same closed way. This can result in the way being used to define both, an area and also a polyline at its outline. For example, a closed way tagged landuse=grass and barrier=fence can be interpreted as a fence enclosing an area of grass.

A clean solution would be to create one element for each feature, i.e. tag the closed way with linear feature tags only and add it to a multipolygon which maps the area. Alternatively, draw a duplicate closed way overlapping the first and use the area feature tags solely on this duplicate. However, overlapping ways might be hard to handle for subsequent users. Also, in situations where a fence divides two plots of land, it should ideally be mapped as a single barrier=fence way between them, rather than each plot having its own surrounding way.

Highway areas

Pedestrian areas (for example squares and piazzas) should be formed using a closed-way around the perimeter and be tagged with highway=pedestrian and also area=yes.

Where a road crosses a pedestrian area then a linear way tagged in the usual way should be overlaid across the square. This linear way should shares nodes with the pedestrian area at its entrance and exit from the square.

In the context of roads, area=yes indicates that an area has no street lines within it (i.e., there is no given direction on the area).

Note: There is currently no clear agreement on how highway tag values other than pedestrian should be treated when also tagged with area=yes.

Note: Most pedestrian routing algorithms do not currently route (correctly) across area features, tending to route around the edge or not at all (especially in case of multipolygons). Do not alter your mapping to accommodate such routers.

Proposals

See also