Alteryx : Find Nearest Tool

by Oksana Kirschbaum

Alteryx is a very handy tool working with spatial data. Today I would like to show you the function of the Find Nearest tool.

This tool identifies the shortest distance between spatial objects.

Inputs:

T - 'Target'

U - 'Universe' (optional)

We usually use Target for the known objects while the Universe is for the unknown ones.

For my example, I created several spatial objects - museums, hotels and roads in the area where office from The Data School in Hamburg is located.

As seen from the picture below, we don't necessarily need 2 separate files for U to T, then we can compare the distance between museums, for example:

In the Configuration Window you will see the following selection criteria:

  1. How many nearest points to find?

Number of nearest Universe objects that will be returned for each Target (by default 1)

2.   Maximum Distance.

How far away are you willing to search for the nearest object? We have the option to select distance in miles or kilometers. The tool also has the ability to use driving metrics as the requirement for finding the nearest points. We can also select Drivetime Minutes or Drive Distance (miles or kilometers) from the Distance dropdown.

If we check "Ignore 0 Distance matches", the records matched with each other will not be returned.

In our example we are trying to look for museums that are about 1 kilometer apart and we want find maximum of 5 museums for each.

To see our results on the map we need the Browser Tool. In the Result window we can select a row or rows with objects and they will be highlighted on the map.

In the similar way we can also identify the shortest distance between other spatial objects- polygons, or lines.

In the results window you can also see information about the distance, direction and rank of the objects found.

Fri 17 Jun 2022

Fri 17 Jun 2022