Key:ref

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public-images-osm logo.svg ref
UK traffic sign 2901.svg
Description
Used for reference numbers or codes. Common for roads, highway exits, routes, entrances to big buildings etc. Edit this description in the wiki page. Edit this description in the data item.
Group: References
Used on these elements
may be used on nodesmay be used on waysmay be used on areasmay be used on relations
Incompatible with
Status: de facto

"ref" stands for "reference" and is used for reference numbers or codes. Common for roads, highway exits, routes, entrances to big buildings etc. It is also used for shops and amenities that are numbered officially as part of a retail brand or network respectively.

This key and variations are frequently used to avoid the use of relations.

Key variations

  • ref=*
  • int_ref=* - international reference numbers or codes
  • nat_ref=* - national reference numbers or codes
  • reg_ref=* - regional reference numbers or codes
  • loc_ref=* - local reference numbers or codes
  • old_ref=* - old reference numbers or codes (usually replaced with another)
  • unsigned_ref=* - reference number of code that is generally not signed on the route
  • prow_ref=* - Public right of way reference (England and Wales only)

For cycle routes:

  • ncn_ref=* - national cycle network reference
  • rcn_ref=* - regional cycle network reference
  • lcn_ref=* - local cycle network reference

There is wide use of ref:* as a namespace prefix, and since 2011 the use of a country code ref:FR:*, etc. where keys are clearly country-specific (see France/Liste des références nationales). A selection of frequently used variations are :

key used on description see also taginfo count (12 March 2021)
ref:bag=* Id of Dutch buildings BAGimport 10,470,051[1]
ref:bic=* heritage=* identifiers for (Spain) Bien de Interés Cultural (BIC) Bienes culturales protegidos by the Spanish Government. 688[2]
ref:BLfD=* heritage=* Bayerisches Landesamt für Denkmalpflege (Germany, Bavaria) 6,943 [3]
ref:GB:cadw=* heritage:operator=Cadw id in Cadw's database of scheduled monuments and listed buildings in Wales, United Kingdom [4]
ref:cadw=* heritage:operator=cadw deprecated please use ref:GB:cadw : id in Cadw's database of scheduled monuments and listed buildings in Wales, United Kingdom 825 [4]
ref:GB:nhle=* heritage:operator=Historic England id in National Heritage List for England as maintained by Historic England for England, United Kingdom HE_ref=*
ref:GB:hs=* heritage:operator=Historic Environment Scotland id in the Historic Environment Scotland database of scheduled monuments and listed buildings in Scotland, United Kingdom
ref:GB:niea=* heritage:operator=Northern Ireland Environment Agency id in the Northern Ireland Environment Agency database of scheduled monuments and listed buildings in Northern Ireland, United Kingdom
ref:csioz=* amenity=pharmacy An identification number assigned to each pharmacy in Poland that can dispense prescription drugs. (Poland) 9,300 [5]
ref:ctb=* highway=bus_stop Signposted on Citybus & NWFB bus stops (Hong Kong) 1,785 [6]
ref:De_Lijn=* bus_stop/platform node, route, route_master signposted on bus/tram stops in and around Flanders, Belgium WikiProject_Belgium/De_Lijndata 38,114[7]
ref:dhis2=* boundary=health relation and health infrastructures DHIS2 unique ID, used in +60 countries Congo-Kinshasa/Zones_de_santé/Workflow 560 [8]
ref:doc=* tourism=wilderness_hut Shelters/Huts from the Department of Conservation (New Zealand) Department of Conservation 977 [9]
ref:fgkz=* Relation:waterway FGKZ reference ID (Germany) 11,366 [10]
ref:GB:uprn=* building=house, building=commercial, etc. Unique Property Reference Number (Great Britain) 12,415 [11]
ref:GB:usrn=* roads Unique Street Reference Number (Great Britain) 3,644 [12]
ref:gnbc=* Relation:waterway, Relation:boundary, place=*, others GNBC reference ID (Canada) About the Canadian Geographical Names Database 938 [13]
ref:gnis=* Relation:waterway, Relation:boundary, place=*, others GNIS reference ID (United States) 637 [14]
ref:harbour=* landuse=industrial Number of company in harbour on road signage, used e.g. in the Nederlands 41 [15]
ref:IFOPT=* highway=bus_stop/public_transport=platform node international identifier for bus stops and platforms 165,721 [16]
ref:industrial=* landuse=industrial Number of company in industrial area on road signage, used e.g. in the Nederlands 76 [17]
ref:INSEE=* admin_level=* INSEE code of the French communes 48,233 [18]
ref:isil=* amenity=library International Standard Identifier for Libraries 3,300 [19]
ref:IUCN=* boundary=protected_area International Union for the Conservation of Nature protected area category 197 [20]
ref:kmb=* highway=bus_stop Signposted on KMB & LW bus stops (Hong Kong) 3,810 [21]
ref:linz:address_id=* addr:street=* New Zealand street addresses LINZ 2,057,602 [22]
ref:linz:building_id=* building=yes Imported buildings in New Zealand LINZ 294,502 [23]
ref:linz:pastoral_lease_id=* landuse=farmland  Agricultural stations in New Zealand LINZ 57 [24]
ref:linz:topo50_id=* * Many different imported features in New Zealand/Antarctica/Polynesia LINZ 69,348 [25]
ref:linz:hydrographic_id=* seamark:type=* Hydrographic/maritime features in New Zealand/Antarctica/Polynesia LINZ 1 [26]
ref:mhs=* heritage=* id in the French database Mérimée of historic monuments 37,032 [27]
ref:MMM=* highway=* or emergency=defibrillator or attraction=animal object ID used by Montpellier Méditerranée Métropole, a french local authority Montpellier#Utilisation_du_tag_ref:MMM 579 [28]
ref:NBd=* junction=yes or traffic_sign=* Reference number of the Dutch Nationale Bewegwijzeringsdienst (NBd) 104 [29]
ref:nid=* heritage=* id in Narodowy Instytut Dziedzictwa historic monuments 12,870 [30]
ref:nrhp=* heritage=* identifiers for (United States) National Register of Historic Places (NRHP) records 22 NRHP advanced search 5,337 [31]
ref:rce=* heritage=* Id in Dutch Rijksdienst voor het Cultureel Erfgoed 5,323 [32]
ref:regine=* Relation:waterway REGINE reference ID (Norway) 4 [33]
ref:RS:nkd=*
heritage:RS:criteria=*
heritage=* Immovable cultural property of Serbia Key:heritage#Serbia

http://editor.osmsrbija.iz.rs/nkd/
https://openstreetmap.rs/unos-nepokretnih-kulturnih-dobara-na-mapu-srbije/

825 [34]
ref:RS:naselje=*
ref:RS:opstina=*
ref:RS:grad=*
ref:RS:okrug=*
ref:RS:pokrajina=*
boundary=administrative admin_level=* Offical designations for administrative regions in Serbia https://openstreetmap.rs/kartografisanje-administrativnih-granica-na-mapi-srbije/ 4 720 [35]
145 [36]

28 [37]
25 [38]
2 [39]

ref:RS:ulica=* highway=* Offical designations for streets in Serbia 3,832 [40]
ref:ruian=*
ref:ruian:addr=*
ref:ruian:building=*
building=*, addr=* RUIAN building or address reference ID (Czech republic) 555,363[41]

2,339,861[41]

3,564,721[41]

ref:sandre=* river ref of the French Sandre agency WikiProject France/Cours d'eau 78,511 [42]
ref:svhl=* station-keys of Lübecker Stadtverkehr (Germany) Lübeck/Importe 2,475 [43]
ref:whc=* heritage=* id of the Unesco World Heritage 1,790 [44]
ref:TECB=* bus_stop/platform node, route, route_master signposted on bus stops in and around Brabant-Wallon, Wallonia, Belgium TEC data import 3,577[45]
ref:TECC=* bus_stop/platform node, route, route_master signposted on bus stops in and around Charleroi, Wallonia, Belgium TEC data import 3,348 [46]
ref:TECH=* bus_stop/platform node, route, route_master signposted on bus stops in and around Hainaut, Wallonia, Belgium TEC data import 5,486 [47]
ref:TECL=* bus_stop/platform node, route, route_master signposted on bus stops in and around Liège-Verviers, Wallonia, Belgium TEC data import 9,300 [48]
ref:TECN=* bus_stop/platform node, route, route_master signposted on bus stops in and around Namur, Wallonia, Belgium TEC data import 5,850 [49]
ref:TECX=* bus_stop/platform node, route, route_master signposted on bus stops in and around Luxembourg (province), Wallonia, Belgium TEC data import 5,850 [50]
ref:UrbIS=* building=* addr=* Reference Key of Urbis Database for addresses in Brussels Brussels#CIRB_UrbIS 289,991 [51]
ref:usrn=* Unique Street Reference Number - a primary key use by the National Address Gazeteer in the UK National Address Gazeteer 66,780 [52]
ref:VHAG=* waterway=* reference codenr. of waterways in Flanders,Belgium Vlaamse Hydrografische Atlas 1,442 [53]
ref:hmdb=* memorial=plaque Reference ID for a historical marker or memorial plaque registered in the Historical Markers Database (HMdb) Historical Marker Database
ref:thc=* memorial=plaque Reference ID for a historical marker or memorial plaque registered in the Texas Historical Commission Database THC database (aka Atlas)
ref:pmmcr=* * identifiers used by Municipio de Marechal Cândido Rondon, a local government from Parana - Brazil.

‡ These keys are specifically encouraged for use by JOSM Waterway relation presets.[54] Depending on the scope of the reference system, they may have uses in other key/tag schemas as well.

Core values

None

User defined values

Any valid syntax value

Examples on relations

States and provinces are often tagged with a postal abbreviation in ref. For example:

  • ref=CA The state of California (type=boundary, admin_level=4, name=California - currently relation 165475)

On road routes, the ref is a bare number, relying on network=* to convey information about the road network:

Similarly, on cycle and walking routes, the ref is a bare number and cycle_network=* indicates the route network:

Bus routes use ref to label the bus route. For example:

  • ref=23 Bus route 23. (type=route, route=bus, name=Shanklin>Newchurch>Newport - currently relation 312207)

Examples on ways

There are no global standards as to whether the refs include spaces, hyphens or other characters. At least when nationally consistent, tag what's on the ground. Some countries use spaces on the signs, others don't. In some countries the usage on the signs varies and guidelines are under discussion.

  • ref=A 1 Default reference (German and French references with a space; e.g. A 1)
  • int_ref=E 15 Internationally referenced as
  • nat_ref=A 1 Nationally referenced as (German and French references with a space; e.g., A 1)
  • reg_ref=A 1 Regionally referenced as (German and French references with a space; e.g., A 1)
  • ncn_ref=54 The number reference for a National Cycle Network. See Cycle_routes
  • ref=A 3;A 7 Default for more than one reference (German and French references with a space; e.g., A 1)

In the United States, some of the most popular ref formats do not correspond to what's on the ground, due to historical technical reasons. For example, Interstate highways are tagged e.g. ref=I 75 instead of ref=I-75, and some states use postal abbreviations instead of more ambiguous, human-readable prefixes such as "SR". However, this Sophox query demonstrates how a data consumer can automatically generate human-readable refs using the network=* tag on route relations.

It may seem redundant to tag route refs on both ways and relations, but do not remove a ref=* tag from a way just because the way is a member of corresponding route relations. Mainstream renderers and routers are still unable to infer refs from parent relations, so the way refs are needed for backwards compatibility. Moreover, in some localities, one cannot predict the order that concurrent routes are listed on a sign based on the route relations alone. A regional route may be listed before a national route if the national route only briefly joins the road before diverging. In these cases, ref=* on the way is the only way to indicate the signposted order along that way, since a way does not indicate an intrinsic order to the routes of which it is a member.

In runways of airports (aeroway=runway) this tag is used for the runway designator (for example "ref=02/20" or "ref=09L/27R").

Unsigned reference numbers (e.g. New York State Reference Route Numbers) that are not readily visible on the ground should be placed in unsigned_ref rather than ref.

Examples on nodes

A ref on a node generally means a highway exit when combined with highway=motorway_junction:

  • ref=23 US Highway exits are often just a number
  • ref=23B Sometimes exits have been split into A and B exits.

These refs can also be tagged on the adjoining highway=motorway_link way (or highway=trunk_link, highway=secondary_link, etc.) using junction:ref=*. In general, renderers understand ref=* on nodes, while routers understand junction:ref=* on ways.

ref is sometimes used on bus stops:

ref is sometimes used to label an entrance into a large building or parking area. (If the label is used in addresses, consider using addr:unit=* instead.) For example a shopping mall may have entrances A - L:

Special uses

  • ref:svhl=* - station-keys of Lübecker Stadtverkehr (Germany) - details look at Lübeck/Importe
  • ref:luebeck=* - internal reference for objects the area of Lübeck
  • ref:bufa=* - 4-digit key of the local German tax and revenue offices (Bundesfinanzamtnummer)
  • ref:vatin=CC12345678 - VAT identification number of companies, use CountryCode (e.g. IT for Italy) and the number
  • official_ref=* - Used in cases where the official administrative reference for a road (or other feature) is not identical with the road signs (or other feature ref), e.g. because they are old, or because the administration doesn't have the money to install/update the signage.
  • ref=xxxx - Used to mark official company store number assigned to a place. Example (ref=7872) CVS (You'll see a reference tag added to the building)
  • ref:penndot=* - Used for internal state route designations of the Location Referencing System in Pennsylvania.
  • The approval of the boundary=forest_compartment clarified the meaning of the ref key when applied to forest compartments: in such cases, ref's value must be the one displayed on the ground and the unique ref of the compartment within the encompassing delimited forest, not a ref which is valid in, or applies to, a broader area. See boundary=forest_compartment for more details.

See also

For United States road tagging

  • addr:unit=* – used in cases where the label of a building entrance is used in addresses


References

This is used to add reference information for an element.

LOADING TAG LIST... (If you do not see this tag list, you need to enable Javascript)

This table is auto-generated. See Taginfo/Taglists for a documentation on it. This table is a wiki template with a default description in English. Editable here.


Notes

  • For highways shared by more than one route see Relations/Routes or Faq#What shall I do for roads that have multiple values for a tag?. Relations seem to be the preferred method for tagging this.
  • If more than one reference is given, you are recommended to separate them with a semicolon and without a space character, because this is the widely established syntax in Germany and maybe other countries. But note, this syntax is being heavily discussed in Germany. A better approach might be to have a namespace and add the entity that has issued the ref, e.g. ref:foo=x ref:bar=y.
  • Do not confuse this issue with the space that is present in some countries between the letter and the number in a reference itself.
  • When a road has no number, leave this key unused; this makes sure that routing programs do not try to describe the road by a number.

Possible tagging mistakes

If you know places with this tag, verify if it could be tagged with another tag.
Automated edits are strongly discouraged unless you really know what you are doing!
If you know places with this tag, verify if it could be tagged with another tag.
Automated edits are strongly discouraged unless you really know what you are doing!

References

  1. https://taginfo.openstreetmap.org/search?q=ref%3Abag
  2. https://taginfo.openstreetmap.org/search?q=ref%3Abic
  3. https://taginfo.openstreetmap.org/keys/ref%3ABLfD
  4. 4.0 4.1 https://taginfo.openstreetmap.org/search?q=ref%3Acadw
  5. https://taginfo.openstreetmap.org/search?q=ref:csioz
  6. https://taginfo.openstreetmap.org/search?q=ref:ctb
  7. https://taginfo.openstreetmap.org/search?q=ref:De_Lijn
  8. https://taginfo.openstreetmap.org/search?q=ref:dhis2
  9. https://taginfo.openstreetmap.org/search?q=ref:doc
  10. https://taginfo.openstreetmap.org/search?q=ref%3Afgkz
  11. https://taginfo.openstreetmap.org/search?q=ref%3AGB%3uprn 12 March 2021
  12. https://taginfo.openstreetmap.org/search?q=ref%3AGB%3usrn 12 March 2021
  13. https://taginfo.openstreetmap.org/search?q=ref%3Agnbc
  14. https://taginfo.openstreetmap.org/search?q=ref%3Agnis
  15. https://taginfo.openstreetmap.org/search?q=ref:harbour
  16. https://taginfo.openstreetmap.org/search?q=ref:IFOPT
  17. https://taginfo.openstreetmap.org/search?q=ref:industrial
  18. https://taginfo.openstreetmap.org/search?q=ref:insee
  19. https://taginfo.openstreetmap.org/search?q=ref:isil
  20. https://taginfo.openstreetmap.org/search?q=ref%3Aiucn
  21. https://taginfo.openstreetmap.org/search?q=ref:kmb
  22. https://taginfo.openstreetmap.org/search?q=ref:linz:address_id
  23. https://taginfo.openstreetmap.org/search?q=ref:linz:building_id
  24. https://taginfo.openstreetmap.org/search?q=ref:linz:pastoral_lease_id
  25. https://taginfo.openstreetmap.org/search?q=ref:linz:topo50_id
  26. https://taginfo.openstreetmap.org/search?q=ref:linz:hydrographic_id
  27. https://taginfo.openstreetmap.org/search?q=ref%3Amhs
  28. https://taginfo.openstreetmap.org/search?q=ref%3AMMM
  29. https://taginfo.openstreetmap.org/keys/?key=ref%3ANBd
  30. https://taginfo.openstreetmap.org/search?q=ref%3Anid
  31. https://taginfo.openstreetmap.org/search?q=ref%3Anrhp
  32. https://taginfo.openstreetmap.org/search?q=ref%3Arce
  33. https://taginfo.openstreetmap.org/search?q=ref%3Aregine
  34. https://taginfo.openstreetmap.org/search?q=ref%3ARS%3Ankd
  35. https://taginfo.openstreetmap.org/search?q=ref%3ARS%3Anaselje
  36. https://taginfo.openstreetmap.org/search?q=ref%3ARS%3Aopstina
  37. https://taginfo.openstreetmap.org/search?q=ref%3ARS%3Agrad
  38. https://taginfo.openstreetmap.org/search?q=ref%3ARS%3Aokrug
  39. https://taginfo.openstreetmap.org/search?q=ref%3ARS%3Apokrajina
  40. https://taginfo.openstreetmap.org/search?q=ref%3ARS%3Aulica
  41. 41.0 41.1 41.2 https://taginfo.openstreetmap.org/search?q=ref%3Aruian
  42. https://taginfo.openstreetmap.org/search?q=ref%3Asandre
  43. https://taginfo.openstreetmap.org/search?q=ref%3Asvhl
  44. https://taginfo.openstreetmap.org/search?q=ref%3Awhc
  45. https://taginfo.openstreetmap.org/search?q=ref:TECB
  46. https://taginfo.openstreetmap.org/search?q=ref:TECC
  47. https://taginfo.openstreetmap.org/search?q=ref:TECH
  48. https://taginfo.openstreetmap.org/search?q=ref:TECL
  49. https://taginfo.openstreetmap.org/search?q=ref:TECN
  50. https://taginfo.openstreetmap.org/search?q=ref:TECX
  51. https://taginfo.openstreetmap.org/search?q=ref:UrbIS
  52. https://taginfo.openstreetmap.org/search?q=ref%3Ausrn
  53. https://taginfo.openstreetmap.org/search?q=ref:VHAG
  54. https://josm.openstreetmap.de/browser/josm/trunk/data/defaultpresets.xml