Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Alteryx spatial process: "cookie cutter" style polygon slicing

SergiArtigas
6 - Meteoroid

Hi everyone

 

I've been struggling to find a way to do the following in Alteryx:

 

Given a set of contiguous polygons (input 1), I want to be able to cut each polygon into smaller sections wherever any polygon from a second set (input 2) overlaps it. Each resulting polygon would retain the data of the polygon it originally belonged to.

 

For further clarity, here is input 1 with 15 rows, each containing a shape:

Slide1.JPG

Input 2 is brought in, containing 3 shapes . They sit on top of some of the shapes in Input 1. These 3 shapes, in turn, may or may not overlap each other.

Slide2.JPG

 

Wherever the shapes of input 2 overlap with input 1, AND wherever one shape of input 2 overlaps another shape of input 2 and then also a shape of input 1, the input 1 shape is split in as many sub-polygons as necessary:

 

Slide3.JPG

 

The output is a file similar to input 1 but now with 43 polygons as a result of the "cookie cutting" exercise (as partly illustrated above).

 

Each new polygon retains the data of its "parent". For example in the above picture, polygons 3,4,5,6,7 will all contain the same data that was originally in the polygon tagged "2" in the previous picture.

 

The "circle" (input 2) polygons contain no data and are there only for the purpose of slicing the polygons of input 1.

 

Is there a way of achieving this using Alteryx?

 

Looking forward to your suggestions!

 

: )

10 REPLIES 10
loakes
6 - Meteoroid

I have a similar use case that I'm attempting to solve, but I'm not technically versed enough to modify @Philip 's macro to work for my situation.  The actual spatial data set and description of my business need (and my poor attempt to use the macro) are posted in this thread:  https://community.alteryx.com/t5/Alteryx-Designer-Discussions/quot-Cookie-Cutter-quot-Overlapping-Po...

 

Any help your big brains can help provide would be greatly appreciated!

Labels