Tuesday, 10 April 2018

arcgis desktop - Counting number of points within a grid


I'm trying to count how many floods occur within a given grid cell in ArcMap and I can't figure it out. I've been reading some other posts on here but I haven't been able to find an answer.


I have flood records for several different years in a city. I want to count how many floods occur where. I made a fishnet grid and overlayed that over my city and points, but now I don't know how to get it to count how many points fall within each grid. Does anyone know what tool can do that?


enter image description here



Answer




Spatial Join your points to your polygons, use INTERSECT or WITHIN, no need to keep all the attributes just the OID of the polygon is what's needed on the joined points.


Using summary statistics you can count the points.. use a summary field of FID or OBJECTID depending on what sort of data you have (shape or GDB), summary type of count and a case field of polygon id (FID_1 is the most likely candidate) this will count the IDs of the rows for each unique polygon ID.


Join your Grid polygons to the summary table and you're there.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...