I have two point datasets, 1 showing the location of road accidents, the other showing the location of traffic intersections. I have created a Multi Ring Buffer at 25m intervals around the traffic intersections buffer (ie: a buffer at 25m, 50, 75m, etc.)
I want to select points from the road accidents buffer that fall within the 25m buffer, excluding those outside.
I then want to select points within the 50m buffer, excluding those which fall inside the 25m buffer and outside the 50m buffer. I'll then repeat this process for the remaining buffer.
How would I go about selecting points within the 50m buffer while excluding those that fall outside it and within the 25m buffer?
Using QGIS and the Multi-distance buffer plugin, your buffer zones around the locations of traffic intersections would be non-overlapping, and each zone would be identified in the attribute distance by the distance to the outer border of the zone.
That means that you can do a simple spatial join or point-polygon overlay to get the buffer zone added to your "location of road accidents" dataset.
Vector-> Data management tools-> Join attributes by location
Use your "accidents" point dataset as target and your buffer dataset as join. Take attribute of first located feature. For Output table choose the option that suits you.
Vector-> Geoprocessing tools-> Intersect Vector-> Geoprocessing tools-> Union
Use the "accidents" point dataset as input and the buffer dataset as intersect / union layer.
If you want to select points within the 50m buffer while excluding those that fall outside it and within the 25m buffer, you would select the features with a value of 50 for the distance attribute in the resulting dataset.
I would go as below-
- Use "Dissolve Option" to "ALL" in "Multiple Ring Buffer" tool.
- Split this buffer layer into several layers by buffer distance- have a look here if needed.
- Use CountFeatureWithinLocation tool where "Search Radius" is set to "Zero". It create a field in the "Input" Feature's table that shows count.
N.B. Give feedback if needed.
If you're using ArcGIS Desktop, you can use Select By Location.
- Under Select By Location, set the following parameters:
Selection method = select features from
Target layers(s) = your accident points
Source layer = your intersection points
Spatial selection method = are within a distance of the source layer feature
Search distance = 50 Meters
- Repeat the Select By Location but change these two parameters:
Selection method = remove from currently selected features in
Search distance = 25 Meters
Alternatively, you could use the Near tool to generate a field showing distances from each accident to the nearest intersection point, then use the Python formula below to bin the distances in to 25 m classes.
Distance_class = Round(Distance / 25 + 0.499) * 25