Video
This tutorial is also available as a video.
Review the available fields
You'll start by reviewing the data you have, to assess which fields to summarize and how to summarize them.
- Download the Gujarat project package.
A file named Gujarat.ppkx is downloaded to your computer. A .ppkx file is an ArcGIS Pro project package and may contain maps, data, and other files that you can open in ArcGIS Pro.
- Locate the downloaded file on your computer. Double-click Gujarat.ppkx to open it in ArcGIS Pro. If prompted, sign in with your ArcGIS account.
Note:
If you don't have access to ArcGIS Pro or an ArcGIS organizational account, see options for software access.
A map appears, showing dams and reservoirs for all of India, and district boundaries for the state of Gujarat.
- In the Contents pane, right-click Dams and choose Attribute Table.
The attribute table appears below the map.
- Scroll horizontally through the attribute table to review its fields.
The Dams layer has two fields that are useful to your report: Gross Storage Capacity (km3) and Reservoir Area.
You had hoped to also find a district name field so you could use the Summary Statistics tool to calculate the total number of dams, storage capacity, and reservoir area in each district.
Because there is no district name field, you'll use the Summarize Within tool, which allows you to summarize the information you need based on common geography instead of a common attribute.
- Close the attribute table.
Summarize points within polygons
You'll use the Summarize Within tool to summarize information about all dams within each district.
- On the ribbon, click the Analysis tab. In the Tools group, click Summarize Within.
The Geoprocessing pane appears.
- For Input Polygons, choose Districts. For Input Summary Features, choose Dams.
- For Output Feature Class, replace the text _SummarizeWithin with _Dams and press Tab.
- Leave Keep all input polygons checked.
There is at least one district in Gujarat without dams. You don't want to exclude this district from your new dataset, so you'll keep the box checked.
With these settings, the tool will count how many dams are inside of each district. In addition to a count, you'll also summarize a few of the attributes from the Dams layer.
- For Summary Fields, under Field, choose Gross Storage Capacity (km3). Under Statistic, choose Sum.
A new row of menus appears.
- In the second row, choose Reservoir Area and Sum.
- Leave Add shape summary attributes checked. Leave Group Field blank.
- Click Run.
The Summarize Within tool may take a few minutes to run. When it is complete, a new layer named Districts_Dams appears in the Contents pane.
- In the Contents pane, uncheck the box next to Districts to turn the older layer off.
Review the results
Next, you'll review the new fields that were created by the Summarize Within tool and assess whether they are suitable for your report.
- In the Contents pane, right-click Districts_Dams and choose Attribute Table.
- If necessary, scroll to the far right of the table to see all of the field names.
The table has three new fields that weren't present in the original Districts layer: Sum Gross Storage Capacity (km3), Sum Reservoir Area, and Count of Points.
These fields represent, for each district, the total storage capacity for all dams, the total reservoir area, and the number of dams.
- On the map, zoom to the large reservoir in the southeast part of Gujarat.
Ukai Dam is in the district of Tapi, but its large reservoir is not fully contained within the district. Parts of it are instead in the neighboring district of Narmada and the neighboring state of Maharashtra.
This means that the Sum Reservoir Area field is not correct. It was calculated from an attribute in the point layer, and this calculation did not account for reservoirs that crossed district boundaries. You'll delete the Sum Reservoir Area field and calculate it again.
- In the attribute table, right-click the header of the Sum Reservoir Area field and choose Delete.
- In the Delete Field window, click Yes.
- Close the attribute table.
Summarize polygon areas within polygons
You'll run the Summarize Within tool again. Last time, you summarized the Dams layer. This time, you'll summarize the Reservoirs layer. The tool will provide a count of the number of reservoirs in each district, but because Reservoirs is a polygon layer, it will also calculate the combined area of polygons in each district.
- If necessary, reopen the Geoprocessing pane.
The Summarize Within tool should still be open, with the parameters from the previous steps.
Note:
If you previously closed the Summarize Within tool, on the ribbon, click the Analysis tab. In the Geoprocessing group, click History. In the History pane, double-click Summarize Within.
You'll use the Districts_Dams layer for the Input Polygons parameter, so the output layer will contain the summary fields from both the Dams and the Reservoirs layers.
- In the Geoprocessing pane, change the following parameters:
- For Input Polygons, choose Districts_Dams.
- For Input Summary Features, choose Reservoirs.
- For Output Feature Class, add the text _Reservoirs and press Tab.
You only need to calculate area from the Reservoir polygons, so you'll remove the Summary Fields.
- Under Summary Fields, point to the first row and click the Remove button.
- Remove the reservoir_area row as well.
- Ensure that Shape Unit is set to Square kilometers.
Note:
The Summarize Within tool computes with geodesic distances, which are based on the curved surface of the earth instead of the flat surface of a projected map. This means that the area calculations will be correct regardless of the map's coordinate system.
- Click Run.
When the tool has completed, the new layer appears in the Contents pane.
- Open the attribute table for the Districts_Dams_Reservoirs layer.
Two fields have been added: Summarized Area in SQUAREKILOMETERS, which is the total square kilometers of reservoir area in each district, and Count of Polygons, which is the number of reservoirs that fall within each district.
Note:
To learn how to rename the aliases of the new fields, try the tutorial Manage a layer with too many fields.
- Close the attribute table and the Geoprocessing pane.
Symbolize the results
Now that you have the information you need summarized by district, you'll use proportional symbols to visualize your results and produce some maps for your report.
- In the Contents pane, turn off the Dams and Reservoirs layers.
- Right-click Districts_Dams_Reservoirs and choose Zoom To Layer.
- Right-click Districts_Dams_Reservoirs again and choose Symbology.
- In the Symbology pane, click Single Symbol and choose Proportional Symbols.
- For Field, choose Sum Gross Storage Capacity (km3).
- Check the Maximum size check box.
The map updates to visualize the gross storage capacity for each district. There is markedly higher storage capacity in east Gujarat, due to the Sardar Sarover and Ukai dams.
Note:
Your symbols may have a different color than the example images. To change the color of the symbols, right-click the symbol next to Template.
- Change Field to Count of Points.
There are more dams in the western part of the state.
- Change Field to Summarized Area in SQUAREKILOMETERS.
The district of Tapi has the largest reservoir area, but the distribution is less skewed than for storage capacity.
- Save the project.
In this tutorial, you summarized counts, areas, and attributes of dams into district polygons. You learned how to use the Summarize Within tool to count the number, calculate the area, and summarize the attributes of features from one layer inside the polygon features of another. You learned how to assess and symbolize the results.
You can find more tutorials in the tutorial gallery.