By default the polyline comes with 6 decimals so we avoid to use 5 by default

This commit is contained in:
Mario de Frutos
2018-02-02 13:17:56 +01:00
parent 26e0a5e00f
commit a1f339376e

View File

@@ -51,9 +51,7 @@ def polyline_to_linestring(polyline):
"""Convert a Mapzen polyline shape to a PostGIS linestring"""
coordinates = []
for point in polyline:
# Divide by 10 because mapzen uses one more decimal than the
# google standard (https://mapzen.com/documentation/turn-by-turn/decoding/)
coordinates.append("%s %s" % (point[1]/10, point[0]/10))
coordinates.append("%s %s" % (point[1], point[0]))
wkt_coordinates = ','.join(coordinates)
try: