on 09-27-2016 12:31 PM - edited on 07-27-2021 11:36 PM by APIUserOpsDM
Alteryx’s spatial functions are not limited to the tools found in the Spatial Palette. The Formula Tool, for example, has a variety of spatial functions that expand the Designer’s spatial capabilities beyond those in the Spatial Tool Palette. This article highlights the Formula Tool’s ability to create spatial objects, particularly points and lines, and calculate distance using the built-in expression library (Figure 1).
For the most part, the spatial functionalities included in the Formula Tool expression library are available in tool in the Spatial Palette. However, rather than dragging on multiple spatial tools to complete a process, using the spatial expressions in a single Formula Tool allows you to create a more streamlined workflow. Consider the example workflow that accompanies this article. The input data consists of two sets of Lat/Long coordinates, one for the start point and one for the endpoint. The objectives of the workflow are to 1) create points for the start and end locations, 2) create a line connecting the start and end locations, and 3) calculate the distance between the two points. Believe it or not, all three of these processes can be accomplished using a single tool! In the attached v10.0 workflow, Workflow A (top) uses four expressions in a Formula Tool (Figure 2A). Workflow B (bottom) uses the spatial tools to accomplish the same task. This approach requires 8 different tools to configure the data, create spatial objects and perform the distance calculations (Figure 2B). Both workflows achieve the same results but, in the spirit of minimalism, the Formula Tool’s ability to handle spatial processes efficiently and effectively certainly deserves some kudos!
nice explanation!