Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Calculate border distance between two points

benjaviver
6 - Meteoroid

Hello,

 

I have two points in two different country. I want to calculate what is the distance from the first point to the border and then from the border to the second point.

Calculate the distance between the two points is easy, but what about the border caclulation ?

 

In other words, I want the intersection between the line (between the two point) and the border. With that, I could easily make my calculation :-).

 

Is it possible ? Small detail : Border in Europa

 

Many thanks

 

Benjamin

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @benjaviver ,

 

Do you have a polygon spatial object that displays the borders of Europe?

 

Thanks,

 

Angelos

benjaviver
6 - Meteoroid

Nope,

 

Does it exist in Alteryx ?

 

Thanks,

 

Benjamin

AngelosPachis
16 - Nebula

@benjaviver  Nope

 

But what you can do is build that border yourself with a Map Input tool.

 

In the example I have created, I selected two points on the map, one in Spain and one in Morocco. You should have those two points already.

 

Then I have used a map input tool to create a line that approximates the borders between the two countries.

 

Then I have used a Spatial Match tool to create an intersection between the line formed by the two points and the line formed by the borders. The outcome would be a point.

 

Finally, I used a distance tool to estimate the distance between each of my original points and the intersection.

 

AngelosPachis_0-1613586954171.png

 

Try that and let me know if that worked for you please.

 

Cheers,

 

Angelos

 

benjaviver
6 - Meteoroid

Many thanks Angelo,

 

It completely answer to the question.

 

Weird Alteryx hasn't this country border tool already define somewhere :-).

 

Cheers,

 

Benjamin

Labels