Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Alteryx doesn't plot shapefile properly

Peter4
8 - Asteroid

I'm trying to create a hex map using Alteryx. I'm sure my coordinates are correct, but Alteryx stretches one of the hexagons. Any ideas why? I've plotted the same hexagons in Tableau and they look just fine.

 

Capture.PNGCapture2.PNG

7 REPLIES 7
jdunkerley79
ACE Emeritus
ACE Emeritus

Alteryx is treating them as Latitude and Longitude, not cartesian co-ordinates.

 

If you tell Tableau to treat as Longitude and Latitude it produces exactly the same

2018-10-31_22-01-38.png

CharlieS
17 - Castor
17 - Castor

The values of the two objects are the same, but the coordinate plane they are applied to are different. Projecting objects to the oblate spheroid surface of the earth can be tricky. When drawing custom polygons and calculating coordinate positions, degrees of latitude are pretty consistent, but lengths of longitude vary by the latitude. 

 

Here's a good link on calculating linear lengths of coordinates:

https://gis.stackexchange.com/questions/142326/calculating-longitude-length-in-miles

 

I've attached an example workflow with the calculations necessary to move 0.5 mile in each of the cardinal directions.

Peter4
8 - Asteroid

Hi Charlie,

 

Thanks for your reply! That's really interesting and something I didn't consider at all. Unfortunately, I don't understand your example. Why are you creating 5 points out of one point? And at which point do the 0.5 miles make a difference? The coordinates look the same after each browse tool. I tried implementing into my workflow in various ways, but the outcome still looks the same. Could you give me another hint on how to use it in my workflow and I'll try to solve it.

CharlieS
17 - Castor
17 - Castor

The example was provided to give an example of the calculations necessary to map square objects on a non-square plane.

 

What do you intend to use these hexagons for? There may be a better way that calculating each one. If you're planning to make a hex grid, there are some R packages out there that would be far easier that building the logic in Alteryx from scratch.

jdunkerley79
ACE Emeritus
ACE Emeritus

Was trying to write this last night but failed.

 

The attached should roughly translate X,Y to a latitude longitude.

It does it by moving specified distance from 0,0 and creating new points.

 

The X and Y values are treated as kilometers to move East/West and North/South.

 

You can change the origin point in the formula tool (set φ1 and λ1).

The scaling is controlled in the δ expression by the constant 6371 (radius of Earth in kilometers).

 

 

2018-11-01_16-03-15.png

 

 

CharlieS
17 - Castor
17 - Castor

@jdunkerley79 maths. Nice work!

 

Peter4
8 - Asteroid

Thank you!!!

Labels
Top Solution Authors