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!

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #67: Calculate Spatial Angles

jasperlch
12 - Quasar

Solution attached.

derekbelyea
12 - Quasar
Spoiler
2018-01-12_00214.png
JosephSerpis
17 - Castor
17 - Castor

Challenge Completed

CHarrison
8 - Asteroid

My solution :) 

dsmdavid
11 - Bolide

Just realized there was a "bonus" part of the question. Will come back to it later.

Spoiler
67.png
daniel_ferreira
8 - Asteroid

Follow my solution attached...

StevenBetts
8 - Asteroid

I solved this using the spatial tools (and a crowbar!) a couple of weeks ago but I left the non-spatial aspect of the challenge to come back to when I'd had more experience with Alteryx.

I now see my initial solution was needlessly over-complicated so I figured out a better way to do it, as well as solved the non-spatial tool method. I enjoyed working with the spatial expressions!

I left in my first pop at this challenge for everyone's amusement.

 

Spoiler
challenge 67.jpg

 

kat
12 - Quasar

After much too much frustration over trigonometry and not remembering things, I finally figured it out. Moments after, I remembered the spatial tool that could so easily do this for me! So here are both ways.

 

Spoiler
Challenge #67.PNG
danilang
19 - Altair
19 - Altair

Ha! Trig.  And high school was so very, very long ago!

 

Spoiler
Solution 67.png

 

Dan

Aster
7 - Meteor

 

Spoiler

My workflow:
67 workflow.png

Illustrative:
67 illustrative.png
Please ignore the unnecessarily complex workaround I used to build point C in spatial tools, and the fact that I did not consider the situation when point A may not be the vertex. My two questions are:
1. In the "without spatial tools" part I extracted the coordinates as Double fields and calculate the length of AC and BC with ST_Length and CreatePoints. Then I used ArcTan(BC/AC) to determine Angle A, which turned out to be slightly different from the output from spatial tools (31.592 instead of 31.607). Could anyone tell me why and how to fix it?
(My assumption is the loss of accuracy when I try to put the coordinates in a Double field)

2. Initially I tried to calculate AC and BC by subtracting coordinates (i.e. Length of AC=Abs([X coordinate of A]-[X coordinate of B]) and naturally got the wrong results, which led me to the question: what are these coordinates used in building spatial objects? Are they longitudes and latitudes, and the positive/negative numbers tell West vs East, and North vs South? Is my assumption correct?

 

 

 

I have finished this but have two questions, could someone kindly provide some pointers here? Thanks!

(Please see inside spoiler)