Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Shapefile Overlap as a Percentage

cjmason105
7 - Meteor

The spatial match tool intersect tool shows IF a shapefile overlays another.  I want to calculate how much one shape overlays the other.

 

Here is my example:

I have 2 square shapefiles shown as 1 & 11.  I want to calculate a percentage or area of each of these squares that overlap a circle (second picture).  So my expectation is the value for square 1 is ~15% and square 2 is ~25%.

2 Squares.JPG

Circle.JPG

 

5 REPLIES 5
RolandSchubert
16 - Nebula
16 - Nebula

Hi @cjmason105 ,

 

I think, the Spatial Process tool could be helpful.  You can create a new spatial object for the overlap area. The Spatial Info tool returns the area of the overlap and the base object, calculation of percentage can be done using Formula tool.

 

2022-02-09_17-05-55.jpg

 

What done you think?

 

Best,

 

Roland

OllieClarke
16 - Nebula
16 - Nebula

Hi @cjmason105 

 

If your Squares and Circles are in the same stream then @RolandSchubert has you covered, but if they're in different data streams, then you can use this approach:

OllieClarke_1-1644423852133.png

 

 

In the Spatial Match tool you can output the intersection object if you're matching by intersection:

OllieClarke_2-1644423912468.png

And you can make use of the spatial formulae to work out your percentage without needing 2 spatial info tools:

ST_Area([IntersectPoly],"SqKm")
/
ST_Area([Square],"SqKm")
*100

Hope that helps,

 

Ollie

cjmason105
7 - Meteor

Ollie, I think your solution for 2 data streams is the best option for me.

 

Just to be clear, I want multiple boxes and multiple circles.

For each box, I want to know what circle it overlaps and the percentage.  Am I understanding this correctly?

cjmason105
7 - Meteor

Roland, thank you so much for your answer.  I think this is a great solution but I think Ollie's might be a better fit for my use case.  I just asked for clarification on his.

OllieClarke
16 - Nebula
16 - Nebula

Hey @cjmason105 

 

the spatial match tool acts like a join, so the M output will put all overlapping squares and circles on the same row - so it will work with multiple squares and circles :)

Labels
Top Solution Authors