valhalla-docs icon indicating copy to clipboard operation
valhalla-docs copied to clipboard

polyline encoding samples

Open kevinkreiser opened this issue 9 years ago • 1 comments

we need a corollary to: https://github.com/valhalla/valhalla-docs/blob/master/decoding.md in which we share sample code to generate an encoded polyline that valhalla will accept. there are off the shelf ones but they may not allow for 6 digits of precision or they may swap lat and lon. its best to just show the example ourselves:

for starters heres the c++11 version: https://github.com/valhalla/midgard/blob/6a74643fed445588a2997d37132370bf3e456991/valhalla/midgard/encoded.h#L81-L119

we can do python and js as well.

kevinkreiser avatar Nov 29 '16 18:11 kevinkreiser

mentioned in here https://github.com/valhalla/valhalla-docs/pull/151

rmglennon avatar Mar 14 '17 18:03 rmglennon