Skip to content

Instantly share code, notes, and snippets.

View rafsAcorsi's full-sized avatar

Rafael Acorsi rafsAcorsi

View GitHub Profile
@rafsAcorsi
rafsAcorsi / gist:32943d5a7ff679a6df128e96cf016fb0
Created March 31, 2017 20:49 — 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.