# Calculating how many of certain feature lie within various buffer rings?

I am using ArcMap and I have a series of real estate parcels mapped along with a series of wind turbines. I have created multiple buffer rings around each real estate parcel with distances (0.5, 1, 1.5, and 2) miles.

What I am trying to do is determine how many turbines fall within each buffer ring for EVERY real estate parcel. The near tool is almost what I need, but not quite. I am trying to get an output of something like this.

And so on.

Is there a simple tool that can make this happen?

• Are the buffers actually rings or does each buffer include the area covered by the smaller buffers? Because if they're rings you'll have to do some math/field calculating to get the total turbines within each. – Chris W Dec 1 '14 at 22:20

## 2 Answers

you can create your buffers, then use the Spatial join tool, with the join one to one option. In addition to the optional field statistics, you will have a count field.

JOIN_ONE_TO_ONE —If multiple join features are found that have the same spatial relationship with a single target feature, the attributes from the multiple join features will be aggregated using a field map merge rule. For example, if a point target feature is found within two separate polygon join features, the attributes from the two polygons will be aggregated before being transferred to the output point feature class. If one polygon has an attribute value of 3 and the other has a value of 7, and a Sum merge rule is specified, the aggregated value in the output feature class will be 10. The JOIN_ONE_TO_ONE option is the default.

Then you join by attribute for each buffer on your real estate parcels.

I'm going to suggest two alternative tools/methods to consider - both do require an Advanced license though, just like Near. Neither make use of buffers, as given the sheer number of records you're working with those would be complicated to work with in a spatial capacity without using a model and iterator.

1. The Near tool only finds the single nearest neighbor. However the Generate Near Table tool will actually will return all features ranked in nearest order. This can be restricted to closest (just like Near), closest up to a count, or within a search radius. In your case, running it four times, once for each search radius, should get you tables than can be collapsed into what you're looking for (see below). It will also have a fair number of 'extra' attributes.
2. The other option is the Point Distance tool. This will also generate a list of all the nearest features within a search radius, and similar to the first option would have to be run four times.

Both tools will produce a table that has an input FID and a near FID. Based on your other question you should have 2900 FIDs, but each of them may have multiple near FID records (note if there is no nearest feature in the search radius, no record is produced). Now it's time to flatten the four tables with the Summary Statistics tool. You'll use input FID as a Case field, and can select any field you like for a Statistic field - you don't even really need one, but the tool forces you to have one. You can use near FID if you like, but the method you want is Count. The output will be a table with one record for each input FID (2900 in theory, assuming that at least one turbine is within the radius of every parcel - fewer if not). There will be three attributes - the input FIDs, a count of how many near FIDs have that input FID, and another count/frequency field that says the same thing. The tool happens to generate the count you're looking for automatically, but it still wants you to do a statistic on something.

Now you should have four tables with a list of parcel IDs and a count of turbines within that table's radius. Now you need to get that count into your original parcel data points. I suggest the Join Field tool. You may need to add a new field to the table and calculate its values using one of the existing count fields so that you can identify them - ie, you want fields in your point data called CountHalf, CountOne, CountOneHalf, CountTwo so you can tell which count is which, and unfortunately you can't rename a field (Note: a tool to do this called Alter Field was introduced in ArcGIS 10.2). You could alias it, but that leaves room for a headache later on.

Aside from Join Field you could also just Join the four tables to your points based on parcel ID, and then export the results all at once. You'll just have to be careful with field/file naming to make sure you keep everything straight.