Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Google Polyline Decode

Komarev_TMNA
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!

3 REPLIES 3
TerryT
Alteryx Alumni (Retired)

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!

Komarev_TMNA
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!

jt_edin
8 - Asteroid

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

Labels