# Location Referencing

A location reference describes a location. A location can be a particular point, curve or two-dimensional shape on the surface of the earth. Quite often, when a location is used in an application, it refers to a particular anthropogenic or geographic feature, such as a road, building, mountain or body of water.

In the case of the Traffic API v7, location referencing is focussed on locations that describe roadways.

The three supported location referencing types are:

• TMC (Traffic Message Channel)
• OLR (OpenLR Location Referencing)
• Shape Points

## Length

For all location referencing types, the total length of the location reference is provided on the Location object.

This is provided in the length field.

"length": 659.0


## TMC

Traffic Message Channel (TMC) location referencing method uses tables of pre-coded locations. For details refer the specifications ISO 14819-2:2013 and ISO 14819-3:2013.

HERE's Location Library can decode TMC location references. See the Location Library documentation Working with TMC References for details.

The TMC information is provided in the tmc field:

"tmc": {
"extendedCountryCode": "E0",
"ebuCountryCode": "D0",
"tableId": "1",
"locationId": "10429",
"queuingDirection": "-",
"extent": 1,
"primaryOffset": 0.0,
"affectedLength": 634.0
}


### Note

The TMC network does not cover all roads. If only TMC location referencing is requested then some results may be filtered out as there is no way to represent that location with a TMC.

## OLR

OpenLR Location Referencing (OLR) method defines rules for generating map-independent location references, that is, the actual location references are generated dynamically not requiring use of pre-defined location references. An OLR can reference any roadway, not only a restricted set as is the case for TMC referencing. For details refer to the specification ISO/TS 21219-22:2017.

OLR is a binary format as described in the specification above. The OLR data is encoded in a Base64 string within the response. For details on Base64 encoding, see RFC 4648.

HERE's Location Library can decode OLR location references. See the Location Library documentation Working with OLR for details.

The OLR string is provided in the olr field:

"olr": "CCoBEAAmJQm+WSVVfAAJBQQCAxoACgUEAogZAAHtA2UACQUEAgOEADBigj0="


## Shape Points

Shape points location referencing is the simplest method. For each link in the referenced map, the shape is described by a list of WGS84 coordinates as well as the length of the link.

The shape points are provided in the shape field:

"shape": {
{
"points": [
{
"lat": 52.501569986343384,
"lon": 13.702660035341978
},
{
"lat": 52.50179001130164,
"lon": 13.702860027551651
},
{
"lat": 52.501959996297956,
"lon": 13.703020038083196
}
],
"length": 50.0
},
{
"points": [
{
"lat": 52.501959996297956,
"lon": 13.703020038083196
},
{
"lat": 52.502879993990064,
"lon": 13.703829981386662
}
],
"length": 116.0
},
{
"points": [
{
"lat": 52.502879993990064,
"lon": 13.703829981386662
},
{
"lat": 52.50310001894832,
"lon": 13.704029973596334
},
{
"lat": 52.504169968888164,
"lon": 13.704979978501797
}
],
"length": 163.0
},
{
"points": [
{
"lat": 52.504169968888164,
"lon": 13.704979978501797
},
{
"lat": 52.504879999905825,
"lon": 13.70560996234417
},
{
"lat": 52.50540001317859,
"lon": 13.706069961190224
},
{
"lat": 52.505700001493096,
"lon": 13.70631999336183
},
{
"lat": 52.50596000812948,
"lon": 13.706470029428601
},
{
"lat": 52.50616000033915,
"lon": 13.706549992784858
},
{
"lat": 52.50644003972411,
"lon": 13.706600032746792
},
{
"lat": 52.50668001361191,
"lon": 13.706589974462986
},
{
"lat": 52.50691001303494,
"lon": 13.706559967249632
}
],
"length": 330.0
}
]
}