I have a line shapefile of roads and a point shapefile of car collisions, and am trying to count the number of collisions per road. The points do not exactly intersect with the lines. I'm hoping to end up with a new column in the "roads" attribute table with the number of collisions. I've found a post on how to do that in ArcGIS here: How to produce a 'count' of points intersecting lines?, but haven't been able to figure it out in QGIS.
I've found suggestions to create a buffer of the roads in order to create a polygon and use the Points in Polygon analysis, but the roads data is quite large and creating a buffer was taking ages for me, so I'm hoping there's another option. I've tried using the "Join attributes by location" function, with "roads" as the target layer and "collisions" as the join layer, but I don't know how to set the Precision input so that all of the collision points are counted. In Arc "Join based on spatial location" has "closest" option when joining points to lines, and I'm hoping that QGIS offers something comparable.
I'm using QGIS 2.18.2