Alteryx Solutions 2: Output a Mixture of Spatial Objects - Points, Lines and Polygons

by Mina Ozgen

Shape Files Don’t Accept Multiple Spatial Object Types?

 

Quick blog post today on an issue that has come up a lot recently. Quite a common problem when performing spatial analytics is that you have a variety of spatial objects: points and polygons, points and polylines, etc. If you try and union these objects and output them in Alteryx you will receive this error message:

This is because .shp files cannot accept output multiple spatial object types in one output. Now that Tableau utilises spatial objects it becomes pertinent to have a solution to this issue.

 

Solutions

 

There are a few solutions to this problem:

  1.  Focus on only one spatial object and lose the other (obviously less than ideal but sometimes your analysis does not require both).
  2. Output multiple files and join in tableau (and dual axis the spatial objects).
  3. Use the summarise tool to combine the spatial objects (See my first Alteryx Solution post here to do this) – aggregation must be high enough for this method to work.
  4. Use the buffer tool to convert all spatial objects into polygons.

The solution I will focus on within this blog post will be the fourth method and my personal favourite method. This method was suggested by colleague Neil Lord who is an avid participator of the Alteryx Weekly Community Challenges.

 

Buffering to Convert Spatial Objects into Polygons

 

If you have multiple objects you wish to union and output into one file, you will need to add a buffer after all spatial objects which are not polygons, do this before the union (as seen above). Set this buffer to quite a small size, the smallest Alteryx will buffer to is 0.01. This may cause visibility issues in Tableau for some people and need to be higher (i.e. 0.05). If you are having issues with converting polylines into polygons – i.e. that the lines become broken – you may also have to untick the “Generalise to 1% of the Buffer Size” option.

If you are using a version of Tableau older than 10.4 this is also a solution to utilise the polylines spatial object type. By buffering polyline objects into polygons you can now use these spatial objects in Tableau.

I hope this has helped expand your options when it comes to creating a spatial visualisation.