HERE Map Content - Schema
HERE Map Content Schema

All road-level attribution is associated with the road network from a consistent referencing model, regardless of the attribute values. This model expresses how attribute values relate to the segment and node structure of the topology layer.

## NodeAnchor

A NodeAnchor is the mechanism for binding attribution to an intersection or independent node, and contains only a reference to the node. It consists of the model anchor.proto in common.

The following example specifies how an attribute is assigned to a node.
message NodeAnchor { common.v1.Reference node_ref = 1; } 

An attribute can be applied to a NodeAnchor, regardless of the paths in or out of the node.

## SegmentAnchor

A SegmentAnchor is the mechanism for binding attribution to a range along one or more segments. When a SegmentAnchor references a single segment, the range can represent a linear percentage along the segment, or it can represent a point on the segment where the start percentage equals the end percentage. Single-segment SegmentAnchors are leveraged for much of the attribution, such as the functional class.

The start/end offsets are interpreted as a proportion of the length of the link geometry, given by the sum of the point-wise shortest distance on the WGS84 reference ellipsoid, approximated by Vincenty's formula.

SegmentAnchors can also be multi-segment when there exists a need to express attribution that spans multiple contiguous segments, such as with restricted driving maneuvers. The SegmentAnchor model has the following additional details:

• It specifies how an attribute is assigned to a linear chain of one or more segments.
• A linear chain is a sequence of segments that connect geometrically end-to-end without internal self-crossing.
• A linear chain can form a loop in which case the first and last nodes of the chain are identical nodes.

In general, a SegmentAnchor, as a multi-segment chain, has an overall first-to-last orientation that is independent of the first-to-last orientation of each component segment. Each component segment in the chain either has the same first-to-last orientation as the chain, or its orientation is inverted relative to the chain. It is critical to differentiate the orientation of each component segment from the overall orientation of the chain on which the SegmentAnchor is based.

For example, it is possible that the first node of a segment chain is the last node of that chain's first segment. Likewise, the last node of the chain can be the first node of the chain's last segment. The simple case consists of a single segment. In this case, the chain and the segment always have the same orientation and the range offsets naturally apply to the first segment.

With a multi-segment, the chain orientation is independent of the individual segment orientations.
message SegmentAnchor
(Optional) Values range from (0.0 - 1.0). When not present, the offset is at the start of the range (as in 0.0). Relative to the startingSegment's orientation, which is not necessarily the overall chain orientation.
google.protobuf.DoubleValue first_segment_start_offset = 1
The segments in the anchor will always be >= 1.
repeated OrientedSegmentReference oriented_segment_ref = 2
(Optional) Values range from [0.0 - 1.0). When not present, the offset is at the end of the range (as in 1.0). Relative to the last Segment's orientation, which is not necessarily the overall chain orientation.
google.protobuf.DoubleValue last_segment_end_offset = 3
The attribute's orientation relative to the chain's first-to-last orientation.
common.v1.RelativeDirection attribute_orientation = 4
message OrientedSegmentReference
Reference to an inverted Segment.
 bool inverted = 2
An attribute can be applied to a SegmentAnchor which is defined as follows:
• An ordered list of continuous segments.
• The first and last segments in the list can be partially included from a "distance from start" indication.
• The directions of travel on the segments must include traffic flow through the entire ordered list.

## Attribute Use of Anchor Pooling

Attribute messages leverage the Pooling convention for referencing all the nodes and/or SegmentAnchors to which that attribute value applies in that partition. As such, each unique attribute value is only published once per partition and has one or more node/segment references. For example, the following uses the speed limit attribute:

segment_anchor:
[
{
segment_ref: 123
range: (0.0, 0.5)
},
{
segment_ref: 123
range: (0.5, 1.0)
},
{
segment_ref: 456
range: (0.0, 1.0)
}
]
speed_limit:
[
{
segment_anchor_index: 0, 2
value: 45
},
{
segment_anchor_index: 1
value: 55
}
]

To look up an attribute for a point along a specific Segment ID, search over the SegmentAnchors to find a matching Segment ID and range and note its corresponding index in the overall list of SegmentAnchors. With the SegmentAnchor index, search the list of attribute value messages to find the one that corresponds to the specific SegmentAnchor index.