Alteryx Designer Desktop Discussions

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

Create PolyLine from 2 centroids in 1 row

StephenMack
10 - Fireball

I have a table, and on each row I calculate 2 different centroids. I would like to draw a line between them, but I'm not sure how to work between columns instead of down the rows.

 

I would like to end up with each row having their own PolyLine.

 

I'm assuming this will require some cross tab magic but I can't quite get it to work.

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus

Hey @StephenMack,

 

How about using a Formula tool with a new spatialobj output, My_Line:

 

ST_CreateLine([SpatialObj],[SpatialObj2])

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
StephenMack
10 - Fireball

As usual the solution ends up being surprisingly simple and beautiful. Much appreciated!

joshuaburkhow
ACE Emeritus
ACE Emeritus

Just for my own learning this same thing can be done with the poly-build tool correct?

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
StephenMack
10 - Fireball

In this case I don't think so.

 

Poly-Build tool will create a line or polygon based on spatial data in a single column. I was looking at creating a line between centroids in 2 different columns in the same row.

joshuaburkhow
ACE Emeritus
ACE Emeritus

Ahh nice thank you!

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Labels