HERE Lanes Coordinate Array Offset Encoding
The HERE Lanes implements space optimization for sequences of 2D and 3D coordinates, for example in polylines representing lane and road geometry.
The incremental offsets of these sequences of values are stored and calculated with a simple bitwise XOR function against the reference value. As a result, the Protocol Buffer binary format can more effectively compress these values.
For sequences of 2D coordinates, the first lat/long value in the sequence is offset-encoded against the parent tile's center point, which is included in the top-level message for the tile. Subsequent values are offset-encoded from the previous value in the sequence.
For sequences of 3D coordinates, we separately encode sequences of elevation values in the same manner, with the first value offset-encoded against the tile center-point elevation. Subsequent values are offset-encoded from the previous value in the sequence.
Note: Currently all 3D tile center-points references an elevation value of "0" cm. As HERE Native (Protobuf) does not encode default values for primitive types, some language decoders may not present this elevation value at all. Please assume the data-type default value of "0" in these cases.