Google Polylines, bad conversion
I tried to use this Ruby Gem and encountered a problem with it. Sometimes, I have problems with the output, it seems like there is an issue with rounding when i decode a polyline. If i compare with the array received from the official “Interactive Polyline Encoder Utility”, sometimes, I haven’t the same result.
For example, the string of the polylines used is :
See the attached two screenshot to see the difference:
The first one is from the official google utilities and the second is using the gem.
You can see that the rounding of the GPS coordinates are not the same:
48.87205,2.3006 [48.87205000000001, 2.300600000000001]
Has anyone ever experienced the same thing or does anyone know a way I could transform the result so they are the same without loosing coordinates precision in order to compare two polylines?
One Solution collect form web for “Google Polylines, bad conversion”
This was answered on the project github issues: https://github.com/joshuaclayton/polylines/issues/3