Relation:provides_feature

From OpenStreetMap Wiki
(Redirected from Tag:type=provides feature)
Jump to navigation Jump to search
Public-images-osm logo.svg provides_feature
Description
Used to link objects together and inherit properties. Show/edit corresponding data item.
Members
  • node way area relation – target
  • node area – address
  • node - entrance
  • node area - parking
Status: in usePage for proposal

A provides_feature relation is used to link objects together to inherit some properties.

It improves data cleanliness by avoiding unnecessary data duplication within the database, in particular addresses. Write the address once and link several objects to it. The same goes to link a POI with an entrance, especially when the entrance is not near the door having the official address.

It can also be used as an elegant solution to complicated cases such as a POI having two official addresses. (Think of a large shop on a corner building branding itself as belonging to both streets.)

How to map

Create a relation and add at least two members.

Tags

Key Presence Value Explanation
type ! Required provides_feature Indicates this relation provides features to an object.

Members

There should be one single object with Role target. The relation should contain at least two members.

Element Role Recurrence Discussion
node way area relation Role target ! 1 The target/POI/receiver of the map features provided by the other members
node area Role address ? 0+ Address point.

This will also be the entrance unless tags make it clear it is not. (For instance if the target is a shop and the address point has entrance=home or access=no.)

node Role entrance ? 0+ Entrance door. This is particularly useful when the entrance is not the same as the address.
node area Role parking ? 0+ A place where one can park when visiting the target. Use the main entrance node of the parking area if possible, otherwise it is okay to use the whole parking area.

Examples

For entrances

relation 5261669 (subway station entrance assignment)

For addresses

relation 15807565 (POI address assignment)

Parsing algorithm example

Look for members and identify the member with Role target.

Want its address? Select each member with Role address and derive the full address of that member. If several members have this role, then assume the POI has several addresses.

Want its entrance? Select each member with Role address; addresses are assumed to be entrances unless they have tags restricting entry (e.g. entrance=home or access=no). Then, select all members with Role entrance, they are automatically assumed to be legitimate entrances for the POI.

See also

  • A different common concept of "avoiding unnecessary data duplication within the database, in particular addresses" is to use addr:*=* for the main address object (node / area) and contact:*=* for the several POI objects