HERE Map Content Developer's Guide

Pooling

Often within a partition, a shared message is used multiple times. Since the Protocol Buffer format lacks an explicit concept of reference and to avoid having the same message or reference stored multiple times, we create a repeated field (pool) for these shared messages. References to the value messages are 0-based index into the pool.

In cases where the index reference is optional, we use the google.protobuf.UInt32Value to enable a null reference.

The following example shows how this convention is used to share Address messages across Location messages in a LocationPartition.

message LocationPartition {
  repeated Location location = 1; // all locations in the partition
  repeated Address address = 2; // all addresses in the partition
}
message Location {
  // Optional 0-based index into shared addresses array containing the address for this location
  google.protobuf.UInt32Value address_index = 1; 
  
  ...
}
message Address {
  ...
}