alteryx Community

# Alteryx Designer Desktop Discussions

SOLVED

## Distance Calculation from 4 Cities to 2 Airports

8 - Asteroid

Hello:

I'd like to get some help with calculating the distance from four (4) cities to two (2) airports.

Here's what I currently have in my workflow:

a. Tool Container "Four Cities" includes the lat/long (and centroids) for 4 cities.   The Summarize tool calculates the total distance between all 4 cities.

b. Tool Container "Two Airports" includes the lat/long (and centroids) for 2 airports in the vicinity of the 4 cities.

I'd like to determine the distance between each of the 4 cities and either one of the 2 airports.  So, I need the distance from City_1 to Airport 1, City_1 to Airport_2, ..., ..., City_4 to Airport_2.   Hence, I should end up with 8 distances.

How would I set up/modify the existing workflow to accomplish this task?

Tom

3 REPLIES 3
9 - Comet

20 - Arcturus

@TomBock
We can also use the "ST_Distance" funtion.

😁

8 - Asteroid

@Dina , @Qiu  -- many thanks for providing assistance with this solution.   It is exactly what I was looking for to obtain.

Cheers,

Tom

Labels