Top-level tag

From OpenStreetMap Wiki
(Redirected from Primary feature tag)
Jump to navigation Jump to search

Top-level, primary or feature tags are those that define the nature of map features and therefore may be the sole tags that exist on a map element. All other tags are additional properties describing map features and can be considered additional or secondary tags.

All standalone map elements are supposed to have at least one top-level tag. An element may have more than one top-level tag (for example, building=school and amenity=school on an area representing a school building where actual school operations are currently taking place), as long as it reasonably conforms with the one feature, one OSM element principle. Standalone elements lacking a top-level tag do not necessarily constitute an error, but they are typically ignored by data consumers. Many quality assurance tools issue detect such elements and issue warnings.

Keys used to define top-level tags are called top-level keys. For most top-level keys, any value paired with that key will be considered to be a top-level tag, but there are some exceptions, for example homonymous keys.

The distinction of a top-level is not a part of the OSM data model, but only a widely accepted tagging convention. Therefore, in some cases it can be controversial whether a tag is top-level or not. For example, club=* is considered by some mappers to be only an additional property for amenity=community_centre or amenity=social_centre.[1] Yet 92% of elements tagged with club=* do not feature any amenity=* tag.[2], the generic leisure=club tag (suggested as a possibility in the approved proposal for club=*)[3] was deemed as deprecated in 2014, and amenity=club similarly in 2021.[4]

List of top-level keys

The table below shows the top-level keys widely supported in data consumers, listed in alphabetical order. This is not a definitive list, since according to the any tags you like principle many more exist and may be created at any moment, though are unlikely to be as popular as ones listed here.

For standalone elements

Key Elements Description Usage
advertising=* nodewayarea Used for advertising devices.
aerialway=* way Used for various forms of transport for passengers and goods that use wires, including cable-cars, chair-lifts and drag-lifts.
aeroway=* way For physical infrastructure used to support aircraft, air travel, spacecraft and space flight.
amenity=* nodearea For describing useful and important facilities for visitors and residents.
barrier=* nodeway A barrier is a physical structure which blocks or impedes movement.
boundary=* nodearea Used to mark the borders of areas, mostly political, but possibly also of other administrative areas
building=* nodearea To mark the area of a building, a man-made structure with a roof, standing more or less permanently in one place.
club=* nodearea Used to mark the location where a club regularly meets.
craft=* nodearea A place producing or processing customized goods
departures_board=* node Board with information about scheduled services. Not a top-level tag if used as an attribute on a public_transport=* element.
education=* nodearea Describes various educational features
emergency=* nodearea Describes various emergency services, facilities, amenities or the possibility of access for emergency services
geological=* nodearea Used to describe geological sites.
healthcare=* nodearea A healthcare facility.
highway=* nodeway Used for roads and road-related facilities.
historic=* nodewayarea Used for describing various historic features.
landcover=* area Used for describing physical coverage of an area.
landuse=* area Mainly used for describing the primary use of areas of land.
leisure=* nodewayarea Features associated with leisure activities.
man_made=* nodewayarea Artificial structures other than buildings.
military=* nodewayarea Facilities used by military forces.
natural=* nodewayarea Natural physical landscape features, including those modified or created by humans.
office=* nodearea A place of business predominately providing services.
piste:type=* wayarearelation Indicates the type of a winter sports piste. Is top-level, since often in summer there are no visible features along the piste.
place=* nodearea Defines the center or outline of a named place.
power=* nodewayarea Facilities for generation and distribution of electrical power.
public_transport=* nodewayarea Public transport infrastructure.
railway=* nodewayarea Used for railways and railway infrastructure.
route=* wayrelation A customary or regular line of passage or travel, often predetermined and publicized.
shop=* nodearea A place selling retail products or offering services.
telecom=* nodewayarea Main key for telecommunication systems and networks mapping
tourism=* nodewayarea A place or object of specific interest to tourists.
traffic_sign=* node Used to map physical traffic signs. Not a top-level tag if used together with highway=* on a way way to indicate affected road segment.
type=* relation Specifies relation type.
waterway=* nodeway Used to mark rivers or other kind of waterways.

For dependent elements

Dependent element is an informal name for an element used to refine other feature. Although it is an element on its own, with its own top-level tag, it would often not make much sense in total separation from its associated feature. They usually share geometry with a primary feature or are contained inside of it. For example, an entrance=* element will usually be a node on the outline of the building=* element.

Key Elements Description Usage
allotments=* area Associated with landuse=allotments feature
allotments=plot is used to demarcate a plot within an allotment garden.
area:highway=* area Associated with highway=* features
Used for road areas.
attraction=* nodewayarea Associated with tourism=* and leisure=* features
Used for individual attractions in theme parks, zoos etc.
building:part=* nodearea Associated with building=* features
To mark the outline of a part of building that has properties distinct from other parts of the building.
bridge:support=* nodearea Associated with man_made=bridge feature
Indicates position of the abutments and piers which support a bridge from beneath.
cemetery=* nodearea Associated with landuse=cemetery and amenity=grave_yard features
Used to mark graves and sectors at cemeteries.
entrance=* node Associated with building=* and other enclosed area features
Used to mark entry (or exit) points to buildings or other enclosed areas.
ford=* node Associated with conjoined highway=* and waterway=* features
A place where waterway runs over a road. Not a top-level tag if used together with highway=* on a way way.
golf=* nodewayarea Associated with leisure=golf_course feature
Used to map details of a golf course.
indoor=* nodewayarea Associated with building=* features
Used for marking corridors, rooms, etc. in the Simple Indoor Tagging scheme.
junction=* node Associated with highway=* features
Used for road junctions. Not a top-level tag if used together with highway=* on a way way.
noexit=* node Associated with highway=* features
noexit=yes indicates a dead-end of a road.
playground=* nodewayarea Associated with leisure=playground feature
Used to map individual devices of a playground.
traffic_calming=* node Associated with highway=* features
Engineering dedicated to slow or reduce road traffic. Not a top-level tag if used together with highway=* on a way way.

See also

External links

References