Alteryx Designer Desktop Discussions

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

Spatial Match Clarification: within = inverse(contain)?

Ehatie
8 - Asteroid

Hello guys,

 

I've always thought that when dealing with a target set of points, and a universe of polygons, wanting to know which points fall inside the polygons a SPATIAL MATCH would work as long as I specify target within universe. However, it was also my assumption that if I were to inverse the order of the target and universe, I could get the same results by using universe contains target. Recently it came my attention that this isn't true, however I can't seem to understand why, any help?

 

Thanks,

3 REPLIES 3
RodL
Alteryx Alumni (Retired)

Unless you are referencing actually changing your connections where your polygons are on the T side and your points are on the U side, you can't actually set in the tool to have "universe contains target".

 

It's best to think of the Spatial Match tool as always in reference to the T (Target) side. In other words, the only records that will come through the tool either M (Matched) or U (Unmatched) are the records coming in from the T side. So depending on what you want to see in the results, that will determine what you connect to the Target. Then you adjust the "Where Target ?????? Universe" setting to match on the basis you want.

 

The Help in this case really is helpful Smiley Happy ... Spatial Match Help.

 

Although it will naturally depend on exactly what you're trying to do, a "tip" for using the tool (as found in the Help article) is when working with Polygons -The larger (physically) polygons should be on the Targets side when there are polygons on both sides. When working with Polygons and Points - Configure with the Polygon on the Targets side.

Ehatie
8 - Asteroid

Hello Rod,

 

I realize best practices are great and all, but for theoretical understanding of how the tool is actually working I have a couple more questions (and yes what I meant is inverting the T and U side when you do the invert):

 

It's best to think of the Spatial Match tool as always in reference to the T (Target) side. In other words, the only records that will come through the tool either M (Matched) or U (Unmatched) are the records coming in from the T side. So depending on what you want to see in the results, that will determine what you connect to the Target. Then you adjust the "Where Target ?????? Universe" setting to match on the basis you want.

 

Ideally if my polygon is in my U and my points in my T then the process should be T within U, however this should in theory (and by logic) be the same as saying T contains U if I switch my polygon to T and my points to U. I don't understand why this would yield different results (simply doesn't make logical sense to me, even if you use the same philosophy while checking the help examples).

 

So my original question is more on the why are these 2 process not the inverse of one another (And also as mentioned, in most cases there are, but in a few instances I've found they are not)?

 

Depending on the answer this could potentially provide a whole suite of problems to discuss based on the other forms of setting up the match tool.

 

Regards,

RodL
Alteryx Alumni (Retired)

I've attached a fairly simple workflow that will hopefully help.

 

Again, the Spatial Match tool works in reference to the Target. With the attached, you have all the ZIP code polygons in Wyoming, and some random points that I've created to represent some customers. A couple of the points fall in the same ZIP, another falls in a separate ZIP, and one isn't in Wyoming at all.

 

So how you set it up depends on the question you want answered.

 

If it's..."What ZIP codes in Wyoming have any customers?", then you are referencing ZIPs and thus they should be used as the Target.

However, if it's..."Which customers are inside my ZIPs?", then you are referencing the customers and they should be the Target.

 

As you can see in the example where ZIPs are the Target, you end up with 138 ZIPs that don't match any customers. But with the other example where customers are the Target, the unmatching ZIPs are irrelevant (because your business question is different). All the comes through the unmatching there are the "target" customers that don't fall anywhere within my "trade area universe".

 

Hope this makes sense.

Labels