By default the polyline comes with 6 decimals so we avoid to use 5 by default
This commit is contained in:
@@ -51,9 +51,7 @@ def polyline_to_linestring(polyline):
|
|||||||
"""Convert a Mapzen polyline shape to a PostGIS linestring"""
|
"""Convert a Mapzen polyline shape to a PostGIS linestring"""
|
||||||
coordinates = []
|
coordinates = []
|
||||||
for point in polyline:
|
for point in polyline:
|
||||||
# Divide by 10 because mapzen uses one more decimal than the
|
coordinates.append("%s %s" % (point[1], point[0]))
|
||||||
# google standard (https://mapzen.com/documentation/turn-by-turn/decoding/)
|
|
||||||
coordinates.append("%s %s" % (point[1]/10, point[0]/10))
|
|
||||||
wkt_coordinates = ','.join(coordinates)
|
wkt_coordinates = ','.join(coordinates)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user