Select to view content in your preferred language

How to summarize features within a parish.

261
11
Jump to solution
a week ago
GrayElkington
Emerging Contributor

Screenshot 2025-11-14 at 12.28.00.png

I'd like to to summarise the road lengths within the parish of Burford.

I'm logged into ArcGIS Online's Map Viewer and using the Summarize Within tool:

  1. Features to summarize: OS Open Roads Vector Map Data - SP RoadLink (Burford is within the SP Area)
  2. Summary areas: Parishes May 2023 Boundaries EW BFC - PAR MAY 2023 EW BFC (Covers England & Wales)
  3. Calculate statistics:
    Summarized geometry units - Miles
    Field statistics - length > Sum
  4. Environment settings:
    Processing extent - Full extent

Obviously, this gives me results for the entire SP area. The other Environment settings are also not what I want.

So, how do I clip the features within Burford to Burford's boundaries?

After 48 hours of trying and failing, any help greatly appreciated!

0 Kudos
2 Solutions

Accepted Solutions
BobBooth1
Esri Regular Contributor

Hi Gray,

My suggestion to set the processing extent to the display is intended to limit the number of input features considered in the overlay analysis. It should affect the credit consumption but not the shape/values of the results of overlaying the parishes and the roads (provided the intended analysis area is contained within the display extent). With the parishes filtered to Burfurd and doing an analysis of the roads within the current extent that fall within Burfurd, the credit cost should be well below the 262 figure you're seeing.

Best,

Bob

View solution in original post

0 Kudos
SarahAmbrose
Esri Contributor

I agree with @BobBooth1.

1. It sounds like you have correctly filtered your polygon layer, great! Remaining decisions are mostly about excluding features in your lines layer to lower the number of credits consumed. 

2. For the environment settings you have a few viable options:

  • Processing extent: You have a few options:
    • Layer - This will use the extent defined on the layer (even if you have a filter, it's pulling it from the original layer), and isn't filtering down the features. This will produce the same result as below, but will cost more credits than if you exclude some features for analysis (via other env settings).
    • Display extent - this will help help cut down on credit consumption. Note that it won't "clip" the input features, it will use anything that intersects with your display extent. I would recommend using this option, and make sure when you run the analysis you are "viewing" the area of interest. If you don't want think about what's covered in the extent when you run the data, you can choose "Coordinates" and then "Set coordinated from display" - this will set the extent when you click the button, and won't change even if you zoom or pan around before clicking run. SarahAmbrose_0-1763389153473.png

       

  • Output coordinate system - I would keep it as the default unless you know your result should be in a different coordinate system than the inputs. 

Another option, if you have a way to filter the roads based on region, you could also do that. Then when you run the analysis, it would only use your roads within Burford. Currently, you have  > 260,000 features of roads, and it looks like you probably only care about a very small subset of them. So if you can filter them on an attribute, I would recommend that over the environment settings.

A future note - if this is data you continuously use in the future, and you only care about Burford you could make a view of the data. Then, you could use the view in the future (which lets you apply spatial and attribute filters on a layer) and they look like they are a layer in your org. Doing that would mean you wouldn't need to filter the next time you open it in the map, nor would you mistakenly run analysis on all the features. https://doc.arcgis.com/en/arcgis-online/manage-data/create-hosted-views.htm

I don't think you need to make a view for this analysis, it's more to make long term maintenance + analysis easier once you've figured out your future needs + complete this analysis. 

 

View solution in original post

0 Kudos
11 Replies
BobBooth1
Esri Regular Contributor

Have you tried applying a filter to the Parishes layer to display only Burford first?

https://doc.arcgis.com/en/arcgis-online/create-maps/apply-filters-mv.htm

I think that would work.

You could also try this workflow to extract the parish:

https://support.esri.com/en-us/knowledge-base/how-to-clip-a-hosted-feature-layer-to-a-specific-polyg...

 

0 Kudos
GrayElkington
Emerging Contributor

Thank you, Bob, and no I didn't apply a filter. You may have guessed I'm an ESRI amateur so you're free to assume limited knowhow.

I've applied a filter now and Burford is isolated on the map and the count of features on the Parishes Boundaries layer is 1. So that seems right.

Yet, when I run an estimate, the number of credits shown is 262,823, which matches the number of features in the entire SP Geotile.

I'm missing something for sure! If you have a moment, I'd again be very thankful.

Btw, I'm persevering with this option because I see the other option you suggested deals with Map Viewer Classic, which I'm not familiar with.

0 Kudos
BobBooth1
Esri Regular Contributor

Try setting the Analysis Extent to the current display extent, and zoom to the extent of the parish.

https://doc.arcgis.com/en/arcgis-online/analyze/environment-settings-mv.htm

See this bit of a tutorial for a model of how to set the extent:

https://learn.arcgis.com/en/projects/clip-a-layer-in-map-viewer/#:~:text=extent%20of%20the%20map%20t...

0 Kudos
SarahAmbrose
Esri Contributor

Hi @GrayElkington you can either "clip" the features using the overlay layers tool (union option) or put a filter on the polygon features.

Option 1: Use the Overlay tool

  1. Add the line layer and polygon layer to the map
  2. Create a filter on the polygon layer (I'm assuming your Parishes Boundaries layer has a field you can filter on). Something like "Area == Burford". See screenshot on filtering below. 
  3. Run Overlay Layers -> Intersects with the lines and filtered polygons. Make sure the output geometry is set to "Line"
  4. This should result in the lines that are within the Burford Area.

SarahAmbrose_1-1763145279523.png

 

Another option requires fewer tool runs, and is similar:

  1. Add the point and line layers to the map
  2. Apply the filter to the polygon layer (as you did before)
  3. Run Summarize Within using the filtered layer

I think those should both work. Here is what setting a filter looks like:

SarahAmbrose_0-1763144925993.png

  1. Select the layer you want to filter
  2. Click the filter button
  3. Set the condition to specify the features of interest
  4. Save it

Once you save it, you will only see the filtered features on the map. 

Here are a few references to help:

https://www.esri.com/arcgis-blog/products/arcgis-online/analytics/tips-and-tricks-for-selecting-subs...

- https://doc.arcgis.com/en/arcgis-online/create-maps/apply-filters-mv.htm

 

Please let me know if that doesn't address your needs,

Sarah Ambrose
Product Engineer
Web Analysis

0 Kudos
GrayElkington
Emerging Contributor

Thank you Bob and Sarah.

Bob, if I set to the current display extent the borders won't exactly match the parish borders. So, if I understand you correctly, that won't work since I need the lines intersected at the parish border.

One of your links points to the Overlay Option. I recall, two or three years ago, managing what I'm trying to do by only using the 'Summarize within' option, so I'm tempted to stick with it. I should have recorded how I did it, but hindsight...

 

Sarah, thank you... I favour 'Summarize within' but can't get the right result.

Could you please check my workings below:

In the Layers Menu, I select the Parish Boundary Layer (PBL) (i.e., Parishes May 2023 Boundaries EW BFC - PAR MAY 2023 EW BFC).

With the PBL Layer still selected, I click on Filter in the light menu and enter the code for Burford, which is in the table that appears by clicking on Burford in the map, i.e., labeled PAR23CD.

I click on Analysis in the light menu
Under Tools, I select Summarize within

My selections are then:

Features to summarize
Input features: SP RoadLink Layer from Layer Dropdown

Summary Areas
Area type > Polygon layer: Parish Boundary Layer (Count of features: 1)

Calculate statistics
Include summarized geometry of features: Toggle ON (to total the Length of all Lines)
Summarized geometry units: Miles
Field statistics: Leave
Group by field: Leave

Result Layer
Output name: Burford Roads
Save in folder: GrayElkington

Environment settings
Output coordinate system: WHAT DO I PUT HERE? (putting the PBL costs 262 credits)
Processing extent > Layer: WHAT DO I PUT HERE? (putting the PBL costs 262 credits)

0 Kudos
BobBooth1
Esri Regular Contributor

Hi Gray,

My suggestion to set the processing extent to the display is intended to limit the number of input features considered in the overlay analysis. It should affect the credit consumption but not the shape/values of the results of overlaying the parishes and the roads (provided the intended analysis area is contained within the display extent). With the parishes filtered to Burfurd and doing an analysis of the roads within the current extent that fall within Burfurd, the credit cost should be well below the 262 figure you're seeing.

Best,

Bob

0 Kudos
SarahAmbrose
Esri Contributor

I agree with @BobBooth1.

1. It sounds like you have correctly filtered your polygon layer, great! Remaining decisions are mostly about excluding features in your lines layer to lower the number of credits consumed. 

2. For the environment settings you have a few viable options:

  • Processing extent: You have a few options:
    • Layer - This will use the extent defined on the layer (even if you have a filter, it's pulling it from the original layer), and isn't filtering down the features. This will produce the same result as below, but will cost more credits than if you exclude some features for analysis (via other env settings).
    • Display extent - this will help help cut down on credit consumption. Note that it won't "clip" the input features, it will use anything that intersects with your display extent. I would recommend using this option, and make sure when you run the analysis you are "viewing" the area of interest. If you don't want think about what's covered in the extent when you run the data, you can choose "Coordinates" and then "Set coordinated from display" - this will set the extent when you click the button, and won't change even if you zoom or pan around before clicking run. SarahAmbrose_0-1763389153473.png

       

  • Output coordinate system - I would keep it as the default unless you know your result should be in a different coordinate system than the inputs. 

Another option, if you have a way to filter the roads based on region, you could also do that. Then when you run the analysis, it would only use your roads within Burford. Currently, you have  > 260,000 features of roads, and it looks like you probably only care about a very small subset of them. So if you can filter them on an attribute, I would recommend that over the environment settings.

A future note - if this is data you continuously use in the future, and you only care about Burford you could make a view of the data. Then, you could use the view in the future (which lets you apply spatial and attribute filters on a layer) and they look like they are a layer in your org. Doing that would mean you wouldn't need to filter the next time you open it in the map, nor would you mistakenly run analysis on all the features. https://doc.arcgis.com/en/arcgis-online/manage-data/create-hosted-views.htm

I don't think you need to make a view for this analysis, it's more to make long term maintenance + analysis easier once you've figured out your future needs + complete this analysis. 

 

0 Kudos
GrayElkington
Emerging Contributor

Thanks Bob and Sarah. I really appreciate the time you have given to this.

Given that over 14,000 parishes may have to be assessed for road length, this has been a fruitful exercise.

Between you and ChatGPT and Gemini, I now have a much better grasp of how AGOL works. Using Display extent, I've reduced the features to process to 286 (0.287 credits), which is somewhat better than 262,822.

I did manage to reduce the Burford feature count to 177 using Overlay layers, but that also uses 0.287 credits - without summing the road lengths, of course. So no point in doing that unless I wanted to run more than one calculation per parish, which I don't.

I'm slowly getting the hang of this. And then again, maybe I should be using ArcGIS Pro... and the learning curve starts afresh 😕

0 Kudos
BobBooth1
Esri Regular Contributor

Given the number of parishes, I think a different approach is warranted.

It looks as though there are around 1,280 parishes that cover the SP_Roadlink block of road segments.

I tried the analysis using the Summarize Within tool in ModelBuilder in ArcGIS Online.

BobBooth1_0-1763651641381.png

The process ran for about 30 minutes (less actually, but I wasn't watching when it finished) and the ModelBuilder session cost 26 credits. You pay for Analysis Session time rather than features processed (mostly) when using ModelBuilder in ArcGIS Online.

BobBooth1_1-1763651662727.png

The awkward thing is, you said 14,000 parishes. The way the road data is tiled, you'll need to run the analysis on each block of road segments (so, roughly 30 times?).

There may be some strange edge effects, for parishes on the edges of blocks of roads.

BobBooth1_2-1763651909387.png

Notice the light colored edge parishes with low road length sum values.

If it were my analysis, I'd do it in ArcGIS Pro with local geodatabase feature class data.

I'd get a local copy of the road segments and parishes data, merge all of the road segments back into a single feature class, and use an ArcGIS Pro overlay tool (Intersect or Union or Summarize Within) to make a single massive feature class of all road segments with the parish name attribute on them. Then (unless I used Summarize Within) I'd calculate summary statistics to get the Sum of the length of the features by Parish name (or better, Parish ID code, if there is one in the dataset, because names might repeat).

Best,

Bob

 

 

0 Kudos