Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

Google Polyline Decode

Highlighted
6 - Meteoroid

I've set up the API to Google Maps / Directions and successfully returned an encoded poly line:

 

JSON_Name: routes.0.overview_polyline.points

JSON_ValueString: ewzhErgmmQaA@BeF@}BbBFhLA\??QAiDDcRB}RBiK?qAR?xVf@@cE@mF|C@GlT

 

The macro to decode the string was posted here some time ago (Parse Encoded Google Polyline) however upon running it, it's returning coordinates off the east coast of South America when they should be in Plano, TX.  The polyline build in Alyerx actually looks correct, it's just in the wrong location.  I've checked the other returned JSON values and Google is returning correct addresses and route information.

 

The workflow is following the steps to encode coordinates in reverse order from the documentation provided by Google here: Encoded Polyline Algorithm Format 


Please help me in fixing / updating the workflow to correctly return Lat / Lon for route information!

Highlighted
Alteryx Community Team
Alteryx Community Team

That was kinda fun to reverse engineer!

 

I think there was a problem in the step 7 to step 6 transition (from https://developers.google.com/maps/documentation/utilities/polylinealgorithm)

 

clipboard_image_0.png

 

Good luck!

Highlighted
6 - Meteoroid

I think I found it at the same time you did!  I'm going to run a few more scenarios to double check, but I will mark your reply as the solution if it all checks out!

Highlighted
8 - Asteroid

This is insanely useful, I can't believe it hasn't had more attention. Thank you!

Labels