Area

From OpenStreetMap Wiki
Jump to: navigation, search
Showing a pedestrian area as an area and residential road as a polyline.

An area (or filled polygon) can be defined as an enclosed filled area defined as a closed way with appropriate associated tags or using a relation:multipolygon creating an area from one of more ways.

Note that areas are not currently (Jan 2012) distinct data primitives and some closed ways (for example landuse=*) are assumed to be areas, but others, such as highway=footway are not, being treated as Polylines instead unless there is also an area=yes tag.

Contents

How to Map

As a closed way: Draw the required outline as a closed way by clicking the end of the line back onto the starting node. For all roads and paths (which use highway=*) it is also necessary to add a access=yes tag; this tag is also currently required for railway=platform because platforms do not currently render on the main mapnik view without it. For all other tags closed ways are assumed to be areas.

As a multipolygon. Create any necessary ways to complete the area and then add them to a relation of type multipolygon with a role of "outer". See the multipolygon artcile for details about how to create more complicated areas with enclaves or exclaves.

Examples

Picture/Description Tags Mapnik Osmarender Example
Roads may end in a small area that has no lanes

highway=residential and area=yes for square, highway=residential only for approaching street

Mapnik area residential.png Osmarender area residential.png
For a plaza area

highway=pedestrian
area=yes

Mapnik area pedestrian.png Osmarender area pedestrian.png Mf way.png 18621949

A simple area

In this example a lake is defined by a closed way where the last node of the way is the same as the first way. The use of natural=water includes an implied area=yes.

  <way id="4876027" timestamp="2008-03-12T07:59:11Z" user="MichaelCollinson">
    <nd ref="31492372"/>
    <nd ref="31492338"/>
    <nd ref="31492370"/>
    <nd ref="31492371"/>
    <nd ref="31492372"/>
    <tag k="natural" v="water"/>
    <tag k="name" v="Spegeldammen"/>
  </way>

A multipolygon area

As real used, it is shown like that for a relation:multipolygon:

  <relation id="12" timestamp="2008-12-21T19:31:43Z" user="kevjs1982" uid="84075">
    <member type="way" ref="2878061" role="outer"/>
    <member type="way" ref="8125153" role="inner"/>
    <member type="way" ref="8125154" role="inner"/>
    <member type="way" ref="3811966" role=""/>
    <tag k="created_by" v="Potlatch 0.10f"/>
    <tag k="type" v="multipolygon"/>
  </relation>

See also

Personal tools
Namespaces
Variants
Actions
site
Toolbox