Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.

Question: Correct way to calculate area of overlapping spatial objects?

5 - Atom

I'm trying to figure out why these two methods produce different results. I created two points, one for Lenexa and one for Overland Park and I want to calculate the combined area with them both having a 5 mile radius trade area.


Path #1: Create trade areas with 5 mile radius, do not allow overlap. Spatial Info gives two areas that add up to 116.535 square miles.

Path #2: Create trade areas with 5 mile radios, allow overlap. Combine to a single object and Spatial Info gives an area of 116.754 square miles.


Logically I would think these should come to the same result, but they do not. So my question is why do they not, and why would you use one method over the other?


EDIT: added a workflow that shows both paths and their respective results.

Alteryx Partner

There must be something else that you have selected ....  a circle with a 5m radius is 78.54 sqm, so 2 of them would be over 157.


But I don't know USA geography well enough to know if they should overlap or not, I guess not by the way you're talking.


Do you have a sample workflow/data to share ?

5 - Atom

I added a workflow to my original post. I'm trying to determine why the two methods come to different results when the areas overlap.

Alteryx Certified Partner

Hi @NathanC,


As i can see the difference between overlapped and non-overlapped area is because of  the line drawn in case of non-overlapping of trade area. You can observe non-overlapped area is slighlty smaller than where you have combined the overlapped trade areas.

If any way you want use the combined area of overlapped trade areas you should not eliminate the overlapping and then combined it using summarize tool.






Hi @NathanC


This is a really interesting question.


The first thing you need to understand is what exactly an Alteryx "Spatial Object" is. If you take a select tool and convert the "SpatialObj" data type to a V_String - you'll find that the "SpatialObj" is merely GeoJson. GeoJson supports 6 types of shapes: Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon.


So what exactly does this mean for you? It means that your circular trade areas aren't true circles - as GeoJson doesn't support the "Arc" shape type. Instead - it's a 100 sided polygon built out of 101 points. Now the difference in calculated area between πr^2 and (nr^2)*tan(π/n) [where n is the number of sides] is quite small for a 100 sided regular polygon - but there is a difference and that difference grows or shrinks as the number of sides decreases or increases, respectively.


So which calculation is more accurate for your use? Well it's whichever polygon has the most sides. If you follow my example (attached) - you'll notice that when we break apart the Non-Overlapped Trade Areas into their component points - we have 58 points. However, if we allow the Trade Areas to overlap then use the summarize tool to combine them and then break that combined object into its component points - we end up with 109 points - which will result in a more accurate area calculation.

5 - Atom

Fascinating. Thank you @TravisR for the thorough explanation and example.