I want to replicate the manual Spatial join (R-click Join) using 'count' in ModelBuilder.
I have 2 datasets:
- Historic Road Traffic Collisions (RTC) locations - Point feature (gdb) - 3,398 rows
- Road Network in segments - polyline (Shp) - 149,775 rows
and I want to count the number of RTC per road segment so I can display only sections that have more than 1 historic RTC and show different thickness of line based on the value returned.
It works fine when I do it manually. However the Spatial join in the ModelBuilder does not bring back a count. I am also unsure of the results.
- If I use 'Intersect' it does not bring back anything
- If I choose 'Closest' it attributes a value to all my segments (which it should not).
Sometimes it also bugs and "null" all my table fields apart from the 1st row. Anybody have any idea of what I am doing wrong?