How to iterate through attribute table, perform geoprocess, then add data to new table

292
1
11-25-2020 04:38 PM
Labels (1)
New Contributor

I want to iterate through a process and compile a table of new data.  Specifically, I want to clip roads to a neighborhood polygon in a city shapefile, calculate the length of the roads in the new clipped shapefile, and output it to a table.  I can do this once and I can do it through all of the rows of the to get a total (of all roads in the city) on one line in a table, but I do not know how to iterate through multiple neighborhoods (polygons in a shapefile) and create multiple lines of data in a table (ie the total length of roads in each neighborhood polygon).

To be clear, I want to:

1. clip roads to neighborhood

2. summarize statistics -- SUM

3. add sum to table

4. iterate to next line in feature class

Reply
0 Kudos
1 Reply
MVP Regular Contributor

Have you looked into model builder for this?

 

Reply
0 Kudos