# Generating statistics from line and hex grid in ArcGIS Pro?

I have a process I use QGIS/mmqgis for. I have a hex grid that I use for binning large data, and I have that hex grid overlaying a road network. I use the "Join Attributes by Location (Summary)" tool to generate a new road network that has a series of statistics derived from all the cells a line traverses. Maybe more helpful to see the principle:

QGIS will give me a new road network and each feature has a min, max, mean, sum, range, etc derived from all the hex cells that feature intersects. In the example graphic, the processed top line would have a sum of 500 and the tributary line would have a sum of 495.

I have tried to reproduce this analysis in ArcGIS Pro for a series of users who only have Esri tools, and have not been able to do so. I have tried using Summarize Within, and this "sort of" works, but it creates a duplicate of each feature (line) for each hex cell it traverses and thus gives me no statistics.

How would I go about accomplishing this?

Pythonic solutions are fine as long as there is an explanation of which method to use in particular.

• What precisely have you tried with ArcGIS Pro? Where precisely are you stuck?
– PolyGeo
Mar 26, 2019 at 18:57
• Intersect and summarise using unique line id. Mar 26, 2019 at 19:43
• I have the polyline layer loaded, I have the hex bins that contain a 'count' field. I have tried: Spatial Join, and have tried setting the point count field (from the hex cells) to "mean" to run an average; I've also tried using Summarize Within, but both of these approaches leave me with duplicate geometry with no summarized point count statistics. So regarding the example i posted, Arc gives me 4 duplicate lines, each with an attribute of 150, 175, 150, and 25, respectively. Mar 26, 2019 at 19:48
• Use summary statistics tool on that and perhaps read my 1st comment again. Mar 26, 2019 at 19:59
• @FelixIP that worked, thanks! If you want to flesh it out and put it as an answer I'll mark it correct. Mar 26, 2019 at 20:51