ArcGIS Pro Select Points – Selecting Points Based on Mutual Distance and Same Attribute Value in ArcGIS Pro

arcgis-desktoparcgis-prodistanceselect-by-attributespatial-cluster

I have a layer of many points. From those, I need to select only those, that meet condition of having atleast two other points, in specified distance (lets say for example 100 meters) but where these points share the same value of an attribute at the same time aswell.

To be more specific, my points have an attribute "year" and the values are 2015-2020. What I want, is to find a groups of those points, that have atleast 2 other points of the same year in selected distance.

enter image description here

The result should be something like this, selecting a nearby group of points from the same year.

I believe, that there is "stupid" way of doing it by making at first a multiple layers for each year separately and then with the help of buffer, but since the problem, I am trying to solve is a little bit more complex, than I described, I would be making so many layers, that it makes this solution unrealistic.

How do I do this using ArcGIS Pro?

Best Answer

ArcGIS Pro 3.0.2

Edit 2: Spatial Join comes with a Join_Countfield. So you should be able to just filter for Join_Count >= 3.


I wanted to add that if you know you're looking for features where a certain attribute is equal to a predetermined value, then you can actually filter for field = value first, then do the self-spatial join since only the selected records will be processed. This would allow you to skip that step with the adding fields to the join output.

Original Answer

The first thing that comes to mind is you can try spatial join the layer to itself, then select by attribute.

  1. Select Spatial Join tool
  2. Enter your feature class as both Target Features and Join Features
  3. Set Join Operation as one to many. Note: You can set this to one to one if you don't care which feature is within a distance and you just want to know if a feature has something within certain distance.
  4. Select your match option. Based on your description, you probably want something like Within a distance set to whatever you want. I did 100ft just for ease.
  5. Under output fields, add two new fields. Set the first one to your desired attribute from the first layer, then the second one to the desired attribute from the second layer. Since you're doing a self join, both layers will have the same name in the drop down. Just be sure to select the first and then second and not to accidentally choose the same one.
  6. Use Select by Attribute to find your desired records. I did field <> field, but you'll probably do the opposite and have field = field.
  7. Export your results

If you choose one to many, then you'll have duplicate records, one for each feature within the specified distance. If you chose one to one, then it will just be the first one that ArcGIS Pro selects (unless you changed the merge rule).

If you uncheck the Keep All Target Features, then you'll only get records that have another one within the specified distance. I left my checked out of habit, but now that I think about it you'll probably want to uncheck that option.

Let me know if that worked for you!

enter image description here enter image description here

Related Question