cancel
Showing results for
Did you mean:

# Alteryx designer Discussions

SOLVED

## Spatial: Adjust Point by Distance?

Asteroid

Is there a way to adjust centroids/points by a distance and direction?  Ideally without messing with trig formulas and converting coordinates to miles?

Say I have a data set of coordinates (latitude and longitude) and I want to move each one East by 1 mile, or another specified distance and direction.  I can't find anything within the spatial tools or formulas to do that, but it seems like it should be simple.  I suspect I'm missing an obvious solution here!

So in this example I'd want my input and output to be something like the attached, where the point(s) were being adjusted by X miles in Y direction.

Highlighted
Magnetar

Hi @EW

The answer depends on your definition of simple.  This technique, using only the built-in tools should get you close to 1 mile in an arbitrary direction

b. Smooth the trade area to increase the number of points on the circumference

c. use Poly Split to extract the points

d. use the find distance tool configured to output the direction in degrees to find the direction from your start to each of the circumference points

e. select the one that is the closest to the direction you're looking for

Also. Weekly Challenge 77 is all about extending lines. Check out the posts there for more options

Dan

Alteryx Certified Partner

Hi @EW ,

Standing on the shoulders of @danilang , I've built an analytic app that will allow you to run the workflow, choose the cardinal direction and it will output the appropriate Lon/Lat.

M.

Magnetar

And taking a cue from @mceleavey, here's an app that takes a distance and direction in degrees and returns a new point offset from the original by the amount specified in the inputs

It uses the process that I outlined above and returns the spatial object and lat/lon of the new point.

Dan

Asteroid

Thanks so much!  Your solutions/apps look like they'll work perfectly.

Labels