Skip to content

Instantly share code, notes, and snippets.

@Andi-Lo
Andi-Lo / gist:84f66545f73453678b6f9ce9841cb260
Created May 11, 2017 20:55 — forked from signed0/gist:2031157
Google Polyline encoder & decoder
'''Provides utility functions for encoding and decoding linestrings using the
Google encoded polyline algorithm.
'''
def encode_coords(coords):
'''Encodes a polyline using Google's polyline algorithm
See http://code.google.com/apis/maps/documentation/polylinealgorithm.html
for more information.