This week, alongside the project, we were learning more about spatial tools in Alteryx. Now, I will go over some of those as an info guide. So, let's begin!
Spatial: Create Points
The Create Points tool creates points on the map using the coordinates in the data. It looks like this:
![](https://www.thedataschool.co.uk/content/images/2022/09/create-points.png)
The configuration window of this tool looks like this:
![](https://www.thedataschool.co.uk/content/images/2022/09/config-window.png)
This is where it takes in the numerical coordinates to be as longitude and latitude and creates those points that we would need. Then if we stick a browse tool at the end of this tool, we will be able to see the points that it has created.
When we click run on the workflow, we can see the points:
![](https://www.thedataschool.co.uk/content/images/2022/09/points.png)
And that is all it does. Just for notice, sometimes you would not get longitude and latitude points that easily from the data source, you would have to do more steps in the configuration window to make sure you get what you need.
Now that we have the points, we need some lines!
Spatial - Poly-Build
The poly-build tool creates a polygon or a polyline from a set of points. This is why we created the points first. The tool looks like this:
![](https://www.thedataschool.co.uk/content/images/2022/09/poly-builkd.png)
The configuration window looks like this:
![](https://www.thedataschool.co.uk/content/images/2022/09/config-window-poly.png)
As we want to build a line from those points, we have selected 'sequence polyline' from the list, but there are other options to choose from. The source field is always a centroid. The group field is what you choose to group your lines by from your data source and in our case, we have chosen route as the points would add up sequentially to form the routes of a bus journey and finally, the sequence field is in what order the points should be joined up.
When we stick a browse tool at the end, and run the workflow, we will get something that looks like this:
![](https://www.thedataschool.co.uk/content/images/2022/09/poly-lines.png)
And voila! Here, we just have to make sure that the sequence field is numeric as if it is a string, it would not go in the order that you might expect as 2 would not come after 1.
And that is your create points and poly-build tools in Alteryx.