Hello,
I am trying to sum the values of 6 feature layers. I have created an index value for each layer within a fishnet (which is the same fishnet for each layer). I am trying to sum the values in each square of the fishnet of the 6 layers. Since I'm just learning, I was hoping their is a somewhat straightforward way to do this.
Thank you!
I attached a screen shot of the fishnet. Each square has a value of 1-6 for each of the layers.
Solved! Go to Solution.
Your last approach (spatial joins) is a good one (as indicated earlier) with the summary field added.
This is a classic case where working with raster data would be easier. Each fishnet polygon could represent one raster cell. Your maps as raster could simply be added together, which is a local statistic operation
Cell Statistics (Spatial Analyst)—ArcGIS Pro | Documentation
Alternative which don't require extra extensions would entail exporting the data to numpy arrays (fishnet centroid, more specifically the OBJECTID field and the attribute field) and summing the arrays since your object id's are all the same. Local statistical functions can be done in numpy and scipy if you don't have the Spatial Analyst extension
Could you please elaborate with little more explanation? You are "trying to sum the values in each square" - what values from the features of each layer you are trying to summarize? I see a polyline in the screenshot - actually there 6 lines (one for each layer). Say, I'm trying to get the value for the first layer on a particular square - what value?
Sure, for each layer I used Summarize Within (fishnet) and then I added a field to the attribute table designate an index value; the value of each square is an integer from 1 - 6 in that field. I was actually able to get a sum by doing a Spatial Join between each layer independently (so I did 7 spatial joins) and then created a new field and summed them. I am still wondering if there is an easier way to sum all the values in one step.
Your last approach (spatial joins) is a good one (as indicated earlier) with the summary field added.
This is a classic case where working with raster data would be easier. Each fishnet polygon could represent one raster cell. Your maps as raster could simply be added together, which is a local statistic operation
Cell Statistics (Spatial Analyst)—ArcGIS Pro | Documentation
Alternative which don't require extra extensions would entail exporting the data to numpy arrays (fishnet centroid, more specifically the OBJECTID field and the attribute field) and summing the arrays since your object id's are all the same. Local statistical functions can be done in numpy and scipy if you don't have the Spatial Analyst extension
Thank you very much for the response! Next time I think I'll transform the layers back to rasters.
Cheers!
Amanda