Select to view content in your preferred language

Summarize Within (Sum) tool error

427
6
Jump to solution
02-10-2026 08:30 AM
dsinha
by
Frequent Contributor

Hello,

I have two layers - a polygon layer and a line layer. Both are in the same coordinate system. I am trying the calculate the sum of attributes from the lines that intersect with the polygons. Below is a screenshot

dsinha_0-1770740786581.png

However, the sum is not accurate. For example, here are the values of the four lines that intersect with one polygon.

dsinha_1-1770740909197.png

And this is the result of the Summarize Within tool.

dsinha_2-1770740965211.png

Not sure what I am doing wrong. Any help would be appreciated.

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
dsinha
by
Frequent Contributor

I just finished the process.

Step 1. Clip the lines using the rectangles.

Step 2. Explode the line segments because the clipped fragments still behaved like a single feature.

Step 3. Run Summarize Within.

Thanks again for helping me think through this process.

View solution in original post

6 Replies
Robert_LeClair
Esri Esteemed Contributor

So I tested the workflows using a polygon and line FC with the same attribute field of CUR_AADT and noticed some differences of your screen grabs to mine.  In the Summarize Within GP tool, I have a Shape Unit parameter - I put in Kilometers as I'm using UTM.  Your screen grab does not show a Shape Unit.  Second, the output table for my Summarize Within has a field yours does not - Summarized Length in KILOMETERS - which does show the correct length of lines in the polygon.  See images below:

Summarize_within_GP.pngsummarize_within.png

dsinha
by
Frequent Contributor

Thanks for taking a look at this @Robert_LeClair. The field was there but I did not pay attention to it since I was not interested in the length of the line segments. I just ran the same tool with Shape Unit set to feet (since I am using State Plane), but the result is exactly the same. The Summarized Length is showing 193 feet, but that is also not accurate - should be around 2.3 miles.

The AADT sum value is supposed to be 56,532 for those four line segments, and I am getting 1223 and you got 38967. Very confusing.

Thanks for your help! 

0 Kudos
Robert_LeClair
Esri Esteemed Contributor

Thank you for the response.  So for my ArcGIS Pro, I created a generalized polygon with 4 lines that cut across the polygon diagonally as I don't know what your map looks like.  See my image below.  I reprojected my data from UTM to Stateplane so we're now in the same units.  So my understanding with this tool is that IF the lines cross over/overlap/extend past the polygon, then the line attribute information is clipped at the polygon border as it were and gives you a proportion of the line attributes "inside" the polygon.  This is why you wouldn't see the AADT sum value being 56532 unless all 4 lines fell inside the polygon.  Mine do not - 68.93% of the 4 lines fall within the polygon so that percentage is multiplied by 56532 to give me a SUM value of 38967.58 AADT sum value.  For the distance (in my case), I get a Summarized Length in FEET of 46848.01764 which is 8.87 miles.

Something is off for sure...

MapView.png

DanPatterson
MVP Esteemed Contributor

a visual would help since you don't mention whether the features cross the boundaries of the selecting feature(s).  the tool may be behaving as designed if this is the one you are using

Summarize Within (Analysis)—ArcGIS Pro | Documentation

What does a Clip produce for the output geometry properties


... sort of retired...
dsinha
by
Frequent Contributor

Thanks for your replies @Robert_LeClair and @DanPatterson. I think I understand why the results are appearing as they are. Here is the visual of my analysis.

dsinha_0-1770747967860.png

I am trying to sum the AADT values of the lines that are passing through each of those rectangles. The numbers I provided in my earlier responses related to the highlighted intersection and the four roads leading to it.

I realize now that I would need to truncate those lines so that they lie within the rectangles and then run the Summarize tool to get the values that I need.

Thanks again!

0 Kudos
dsinha
by
Frequent Contributor

I just finished the process.

Step 1. Clip the lines using the rectangles.

Step 2. Explode the line segments because the clipped fragments still behaved like a single feature.

Step 3. Run Summarize Within.

Thanks again for helping me think through this process.