Spatial functions in Alteryx

by Micol Bedarida

Next week I will be running a teaching session about Spatial tools in Alteryx. While prepping for this session, I came across some underrated functions in Alteryx: Spatial Functions.

Say you had latitude and longitude fields and you wanted to create spatial points from them. In the past, I would have dragged a ‘Create Points’ tool onto the canvas, like this:

Today I learned that instead of doing this, you can use a formula tool to create a point using the ST_CreatePoint function:

Two things to note are:

  • The latitude and longitude need to be in number format (not string)
  • The data output type needs to be a Spatial Object

This was just a simple example, but there are many other spatial functions available in Alteryx.

In case I have failed to convince you that spatial functions in Alteryx are really cool, here are some more reasons you should use them:

  • You can include many steps inside one tool. Instead of dragging various spatial tool onto the canvas, just insert one formula tool and create many spatial formulas within it.
  • There are awesome spatial functions like ST_Random which returns a random point within a spatial object

For another Alteryx spatial trick using the Summarize tool, have a look at this blog.

Hope you have fun with all things spatial in Alteryx. If you want to get in touch, you can find me at on Twitter at @MBedarida

© 2022 The Information Lab Ltd. All rights reserved.