Sometimes Yandex introduced a small and interesting format for encoding polylines of geographic points into string that can be delivered in GET-parameters of an URL or in URL path.
Detailed reading: https://tech.yandex.ru/maps/doc/jsapi/1.x/dg/tasks/how-to-add-polyline-docpage/
This sample introduces encoding of the way from subway station "Park Pobedi" to the Yandex's office.
https://static-maps.yandex.ru/1.x/?l=map&pl=6qE9AjZzUgN1-v__v_X__x_1__-dBgAA&spn=0.008,0.008&plc=8822DDC0&plw=5&key=AKGZNkkBAAAAH_M8CgQA7FLplKkfFDhFFzy7nkwJqkdcyHAAAAAAAAAAAADDnUutMak9ItrhKofGJfwzooVHbQ==
Writing coords of the polyline
37.593578 55.735094
37.592159 55.732469
37.589374 55.734162
Multiplexing each coordinate by 1 000 000
to get unit32
37593578 55735094
37592159 55732469
37589374 55734162
Calculating bias of points from the second one to previsious
37593578 55735094
-1419 -2625
-2785 1693
Convert each number to the binary representation with zeros to get the length of 32 bits (4bytes)
00000010001111011010000111101010
00000011010100100111001100110110
11111111111111111111101001110101
11111111111111111111010110111111
11111111111111111111010100011111
00000000000000000000011010011101
Split each by 1 byte (8 bits)
00000010 00111101 10100001 11101010
Inverse the order of bytes
11101010 10100001 00111101 00000010
Convert bytes with urlsafe base64 encoder.
In urlsafe base64 encoder +/
are replaced by _=
Profit!