The Future of Areas

From OpenStreetMap Wiki
Jump to: navigation, search

OpenStreetMap doesn't have a native Area (or polygon) data primitive and areas are currently modeled using Ways which are also used to describe Polylines.

Not all closed polylines are areas, as this varies based on which other tags are present. A closed way tagged highway=footway is considered to be a circular path unless it has a area=yes tag which turns it into a pedestrianised area, however a closed way tagged with leisure=park is assumed to be an area. Areas can also be described using multiple ways as members of a relation:multipolygon. It is possible within the editors to create parks which are not closed even though these won't normally render unless they are included in a multipolygon. Anyone wishing to tag areas or use areas therefore needs to always check on the default usage of closed ways.

This set of wiki pages describes the problems and confusions created by the current model and suggests some alternative proposed approaches to model areas more clearly, flexibly and simply.

Contents

The current situation (Feb2012)

There are currently two different ways of modelling areas/polygons in OSM: Way-based polygons and relation-based polygons.

Way-based Polygons

Polygons can be created from closed ways (ie. ways where the first and last node are the same). This is most often used for small polygons such as parks, buildings or small lakes.

What makes a closed way into a polygon are the tags used. If the tag refers to something that is an area (such as landuse=* or building=*) the way marks an area, if it refers to something that's a line (such as highway=* or railway=*) the way still is a line. So a roundabout might be described by a closed way, but that doesn't make it into an area. There is an extra tag (area=yes) to turn line features into area features, so a way with highway=pedestrian and area=yes describes a pedestrian area (such as a market place in a city).

Polygons modelled as closed ways can not have inner rings, ie. they can have no holes. It is not possible to define multipolygons (with several outer rings) this way.

Relation-based Polygons

See Relation:multipolygon.

Polygons modelled with relations can have inner rings, ie. they can have holes. They can also have multiple outer rings so they are proper multipolygons.

Note that there is some confusion where the tags for the multipolygons go. Sometimes they are tagged on the outer ring(s), sometimes on the multipolygon relations and sometimes on both.

Special Case: Coastlines

Coastlines can be seen as the boundary between land polygons and sea polygons. But in OSM they are handled in a different way. See Coastline and natural=coastline for details.

Special Case: Wide rivers

Rivers that are too wide to be mapped as line features are mapped with waterway=riverbank. Basically they are mapped as a set of way-based polygons attached end-to-end. What makes this case special is that you have to aggregate those polygons into one larger polygon for the whole river, the polygon parts do not really stand on their own. There is some confusion how this is to be done, especially when islands are involved. Sometimes relation-based polygons are used instead. The tag riverbank comes from the early times of OSM when only the riverbanks were tagged like this and these ways were not connected into polygons.

Sometimes other large areas (such as forests) are arbitrarily broken up into smaller polygons, too.

Problems with the current approach

There are several problems with the current situation:

'Simple features'

The Simple Features model. (Look here for some definitions of words.)

Proposals

Proposed solutions should ideally address all the problems and issues identified above. Partial solutions may however be useful as a basis.

Here are various proposals:

Personal tools
Namespaces
Variants
Actions
site
Toolbox