Several Google Maps products have the concept of polylines, which in terms of basic data is basically just a sequence of lat / lng points, which can, for example, appear in a line drawn on a map. The Google Map Developer Libraries use an encoded polyline format that displays an ASCII string representing the points that make up the polyline. Then, this encoded format is usually decoded with a built-in function of Google libraries or a function written by a third party that implements the decoding algorithm.
The polyline coding algorithm is described in the Encoded Polyline Algorithm Format document. What is not described is the rationale for implementing the algorithm in this way and the meaning of each of the individual steps. I am interested to know if the thought / purpose of the implementation of the algorithm is thus publicly described anywhere. Two examples:
- Some steps have a quantitative effect on compression, and how does this influence vary with delta between points?
- Is summing values ββwith ASCII 63 an incorrect hack?
But, as a rule, the description goes along with an algorithm explaining why the algorithm is implemented as it is.
algorithm google-maps google-polyline
Bryce thomas
source share