Alteryx Designer Desktop Discussions

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

How to Combine Latitude and Longitude.

HannahReed1145
6 - Meteoroid

Hello, 

 

I am a beginner with Alteryx, and I am struggling to figure out how to combine 2 different columns of data I have: "latitude" and "longitude".  

 

HannahReed1145_0-1574642396256.png

 

The data for these two are currently float. However, I want to combine them to create a new column called "Base Location" with a formula: [latitude] + "," [location]. However, to do this, it says that it needs to be a string.

 

However, I prefer to do it in a way that makes "Base Location" a numeric value because I plan on running a summarize tool that will conduct the "minimum of base location" and "maximum of base location". Then, from there, I plan on subtracting the differences of both minimum and maximum of base location to have a new column called "Total Distance Moved". 

 

Any help would be much appreciated. 

 

Thank you, 

Hannah Reed

 

 

4 REPLIES 4
nivi_s
8 - Asteroid

Hi @HannahReed1145 

 

What exactly do you mean by minimum and maximum of Base Location?

 

Cheers,

Nivi

HannahReed1145
6 - Meteoroid

Hello! 

 

Thank you for getting back to me. 

 

Now that you ask that question, minimum and maximum may not be something I would want to do. 

 

I just want to calculate how far they have traveled based off their latitude and longitude. Each device_id has multiple records of different latitudes and longitudes. I would like to somehow calculate the total distance they moved. 

nivi_s
8 - Asteroid

Hi,

 

Understood! You might want to use spatial tools for that, I think there was a similar problem in the weekly challenge right here.

 

Start by using the 'Create Points' tool under Spatial tools to create centroids for each point, and the workflow in the challenge should help you get the line and the distance.

 

Nivi

echuong1
Alteryx Alumni (Retired)

You'd need to start by creating spatial points for the beginning and ending points using the longitude and latitude values and the Create Points tool. You can then use the Distance tool to find the distance traveled. 

 

See below for the tool mastery pages that might be of help: 

Labels