Alteryx has many spatial functions, outside of the spatial tool palette, that provide advanced users access to several additional spatial analysis features. If you missed my last guide covering all of the tools in the spatial palette, check it out here. This guide will go through every spatial function that exists outside of spatial tools. They can be used within any Alteryx tool that allows you to type function expressions.
ST_Area: Requires one spatial object and one unit input parameters.
Outputs the area of the spatial object input in the specified unit. The unit parameter accepts ‘SqKm’ (square kilometres), ‘SqMi’ (square miles), ‘SqMeters’ (square metres) or ‘SqFeet’ (square feet).
ST_Boundary: Requires one spatial object input parameter.
Outputs the boundary of a polygon input as a line.
ST_BoundingRectangle: Requires at least one spatial object input parameter.
Outputs the bounding rectangle of all of the spatial object inputs.
ST_Centroid: Requires one spatial object input parameter.
Outputs the centroid of the spatial object input.
ST_CentroidX: Requires one spatial object input parameter.
Outputs the X value (longitude) of the centroid of the spatial object input.
ST_CentroidY: Requires one spatial object input parameter.
Outputs the Y value (latitude) of the centroid of the spatial object input.
ST_Combine: Requires at least two spatial object input parameters.
Outputs the combined spatial object of all of the spatial object inputs.
ST_Contains: Requires two spatial object input parameters.
Outputs the boolean value (True or False) of whether the first spatial object input contains the second spatial object input.
ST_ConvexHull: Requires at least one spatial object input parameter.
Outputs the convex hull polygon of all of the spatial objects inputs.
ST_CreateLine: Requires at least two point or line spatial object input parameters.
Outputs the line created by connecting all of the point or line inputs in the order of input.
ST_CreatePoint: Requires two numeric input parameters.
Outputs the point mapped from longitude and latitude coordinate inputs.
ST_CreatePolygon: Requires at least two point or line spatial object input parameters.
Outputs the polygon created by connecting all of the point or line inputs in the order of input and including the enclosed area.
ST_Cut: Requires two spatial object input parameters.
Outputs the resulting polygon after cutting the first polygon input from the second polygon input.
ST_Dimension: Requires one spatial object input parameter.
Outputs the dimension of the spatial object input. Point inputs return 0, line inputs return 1 and polygon inputs return 2.
ST_Distance: Requires two spatial object and one unit input parameters.
Outputs the distance from the first spatial object input to the second spatial object input in the specified unit. The unit parameter accepts ‘Km’ (kilometres), ‘Mi’ (miles), ‘Meters’ or ‘Feet’.
ST_EndPoint: Requires one spatial object input parameter.
Outputs the last point of the spatial object input.
ST_Intersection: Requires two or more spatial object input parameters.
Outputs the intersection spatial object of all of the spatial object inputs.
ST_Intersects: Requires two or more spatial object input parameters.
Outputs the boolean value (True or False) of whether all of the spatial object inputs intersect.
ST_InverseIntersection: Requires two or more spatial object input parameters.
Outputs the combined spatial object of all of the spatial object inputs without any intersection area.
ST_Length: Requires one spatial object and one unit input parameters.
Outputs the length of the spatial object input in the specified unit. The unit parameter accepts ‘Km’ (kilometres), ‘Mi’ (miles), ‘Meters’ or ‘Feet’.
ST_MD5: Requires one spatial object input parameter.
Outputs the MD5 hash for the spatial object input.
ST_MaxX: Requires one spatial object input parameter.
Outputs the maximum X value (longitude) of the spatial object input.
ST_MaxY: Requires one spatial object input parameter.
Outputs the maximum Y value (latitude) of the spatial object input.
ST_MinX: Requires one spatial object input parameter.
Outputs the minimum X value (longitude) of the spatial object input.
ST_MinY: Requires one spatial object input parameter.
Outputs the minimum Y value (latitude) of the spatial object input.
ST_NumParts: Requires one spatial object input parameter.
Outputs the count of separate sections of the spatial object input.
ST_NumPoints: Requires one spatial object input parameter.
Outputs the count of individual points of the spatial object input.
ST_ObjectType: Requires one spatial object input parameter.
Outputs the type of the spatial object input: point, line or polygon.
ST_PointN: Requires one spatial object input and one N position input parameters.
Outputs the Nth point of the spatial object input.
ST_RandomPoint: Requires one spatial object input parameter.
Outputs any random point inside the spatial object input.
ST_Relate: Requires two spatial object and one DE-9IM string input parameters.
Outputs the boolean value (True or False) of whether the two spatial object inputs satisfy the spatial relationship specified by the DE-9IM string input.
ST_StartPoint: Requires one spatial object input parameter.
Outputs the first point of the spatial object input.
ST_Touches: Requires two spatial object input parameters.
Outputs the boolean value (True or False) of whether the first spatial object input touches but does not intersect the second spatial object input.
ST_TouchesOrIntersects: Requires two spatial object input parameters.
Outputs the boolean value (True or False) of whether the first spatial object input touches or intersects the second spatial object input.
ST_Within: Requires two spatial object input parameters.
Outputs the boolean value (True or False) of whether the first spatial object input is fully inside the second spatial object input.
That’s all of the spatial function expressions in Alteryx. Several of these functions overlap functionality with the spatial tools, but some of the more specific functions would require multiple other tools to reach the same output. The functions with numeric output can also be combined with operators (+, -, ==, !=) to build more complex formulas. Overall, the spatial functions provide users with a versatile alternative to the tools in the spatial palette.
There’s still more though. The Summarize tool also has several spatial processing functions built in. It can process spatial objects through the given options, all of which output another spatial object:
• Combine
• Create Intersection
• Create Bounding Rectangle
• Create Convex Hull
• Create Centroid
Summarize allows you to do these spatial processes with multiple spatial objects in a single field, while the spatial functions described earlier can only input multiple spatial objects from separate fields.
That’s just about everything that Alteryx can do in terms of spatial analysis. Being able to combine the functionality of all of these functions and processes together with the spatial tools will certainly take your spatial analysis to the next level.