As usage of spatial tools in Alteryx is uncommon, people often got confused on the tools that they need to use when facing spatial datasets. Based on personal experience, I used to get mixed up about when to use Find Nearest and Spatial Match tools. Therefore, this blog was created to explain usage, similarities, and differences between Find Nearest and Spatial Match tools.

Usage

Find Nearest tool is used to identify shortest distance between spatial object in one file and the objects in a second file.

Spatial Match tool is used to establish spatial relationship between 2 sets of spatial objects.

Similarities

Both Find Nearest and Spatial Match tools have 2 input and 2 output anchors. Input anchors include Target (“T”) and Universe (“U”). Meanwhile, output anchors include Matched (“M”) and Unmatched (“U”).

Aside from containing 2 input and 2 output anchors, both Find Nearest and Spatial Match tools have similar configurations for Target and Universe inputs. Furthermore, both tools have the options of using records from U input and records from File or Database. Figure 1 shows configuration window for Target and Universe input.

Figure 1. Configuration for Target and Universe inputs

Differences

– Input Stream Types:

Find Nearest tool requires at least one input stream to contain a point object. Meanwhile for Spatial Match, at least one input stream must be a polygon object.

– Input Configuration Options:

Find Nearest tool requires users to set number of nearest points, maximum distance, and the option to ignore 0 distance matches. On the other hand, Spatial Match tool requires users to specify relationship between Target and Universe inputs, and the option to output intersection object if Target intersects Universe. Figure 2 and figure 3 demonstrate input configuration windows for Find Nearest and Spatial Match tools, respectively.

Figure 2. Configuration option for Find Nearest tool

Figure 3.  Configuration option for Spatial Match tool

– Map Outputs:

As Find Nearest tool can only have Point type inputs, the resulting map output will contain at least one or multiple point object(s) from Target and Universe inputs. Meanwhile, by requiring at least one Polygon type input, Spatial Match tool will result in map that can contain at least one or multiple polygon(s) from Target and Universe inputs. Figure 4 and figure 5 show sample map outputs for Find Nearest and Spatial Match tools, respectively.

Figure 4. Sample map output from Find Nearest tool

Figure 5. Sample map output from Spatial Match tool

– Common subsequent tools

As Find Nearest tool is related to distance between one point or polygon to another point, people tend to put Distance tool to identify distance number between the Target and Universe objects. Figure 6 shows Distance tool and its sample configuration.

 

Figure 6. Distance tool and its configurations

Meanwhile, Spatial Match tool tends to be followed by Spatial Process tool as users may want to identify how Target and Universe will look like when both inputs are combined, intersected, or having regions which are unique to each input. Figure 7 demonstrates Spatial Process tool and its configurations.

 

Figure 7. Spatial Process tool and its configurations

Conclusion

In summary, this blog has shown how Find Nearest and Spatial Match tools are applied in Alteryx. While there are similarities in input sources, there are more differences when it comes to configuration and use cases.

Kristiadi Uisan
Author: Kristiadi Uisan