Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.

How do I fill in gaps between polygons?

Highlighted
10 - Fireball

Hi,

 

I've been Googling this to no avail.

 

What I'd like to do is have Alteryx create a set of polygons (based on lat/long centroids) that fill in the entirety of a given geographic 'container' like a state or country, so that I can append this geometry data point to a data set being sent to Tableau.

 

Some more context:

 

- For a given geography (a state or a country), we have created clusters based on postal codes and sales metrics.

- Each of those clusters can range from a single postal code to hundreds.

- When I create polygons via the Poly Build tool (selecting Convex Hull), I get shapes like this (in the state of California):

 

polygons.png

 

But what I would like to do is flesh those shapes out so that they look more like this:

 

cluster shapes.png

 

I know I can assign a dimension in Tableau as a geographic role (i.e. create from postal code), but the size of the data we're using results in that process (and all subsequent filtering etc) taking a loooong time. So if I could just have Alteryx generate the shape files and pass those in to Tableau, then they should (in theory) render much faster.  But I am at a loss as to how to create those shapes.

 

Any and all help would be appreciated.  Thank you.

 

-Mike

 

 

 

 

 

 

Highlighted
Alteryx
Alteryx

Hi @mix_pix 

 

Great use case Mike!

 

My solution to this would be the following steps:

  1. Use the trade area tool to buffer the source polygons (or points)
    • ensure you check the option to eliminate overlap (as this is not available in the standard buffer tool)
  2. Play around and adjust the buffer distance to ensure that all gaps are filled
    • (don't worry about the shapes extending out of state, we handle this in the next couple of steps)
  3. Append onto the shapes a boundary polygon of the entire region/state
  4. Use the spatial process tool to 'clip' the boundaries to the extent of total region

This is in effect a voronoi polygon interpolation/filling approach, and will result in some generalised boundaries between the shapes.

 

I've attached an example workflow with some UK sample shapes, hopefully this helps you understand the steps.

 

Please let me know how you get on!

 

Thanks

 

David

Highlighted
10 - Fireball

Hi @DavidThorpe .  Thank you for the suggestion (and sorry for the slow reply).  I do see how that does fill in more of the 'white space' around the clusters, but I wasn't able to see how to make the revised shapes actually resemble polygons shapes that would, when combined, look like a traditional state/country.  I'll play around some more but wanted to see if you see this on your end as well.

Highlighted
Alteryx
Alteryx

Hi @mix_pix 

 

I can test on this side as well  if you are you able to share the output as a .yxdb? 

 

Otherwise, another suggesting might be to spatially match the polygons into a state/region boundary file and then in-fill the rest with the above method.

 

Let me know

 

Thanks 

Labels