Relation:provides_feature
provides_feature |
Description |
---|
Used to link objects together and inherit properties. |
Members |
Status: in use |
Tools for this tag |
|
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 or more objects with target. The relation should contain at least one target and another object with another role.
Element | Role | Recurrence | Discussion |
---|---|---|---|
target | ! 1+ | The target/POI/receiver of the map features provided by the other members | |
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.) | |
entrance | ? 0+ | Entrance door. This is particularly useful when the entrance is not the same as the address. | |
exit | ? 0+ | Exit door. This can be used on a door that looks like an entrance but only allows people to exit the facility, or on an emergency exit. | |
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
5261669 5261669 (subway station entrance assignment)
For addresses
15807565 15807565 (POI address assignment)
Parsing algorithm example
Look for members and identify each member with target.
Want its address? Select each member with 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 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 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
- Relation:preferredEntry
- Proposal:Associated Entrance