1

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?

2 Answers 2

2

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

3
  • Thank you very much. I followed your guide and after adding one more line to "Select By Attributes" ("TARGET_FID" not equal to "JOIN_FID") not to count the identical point from both layers, I think I got the result, you intended. However, this is the result for groups of atleast two points, while I need groups of atleast 3, so I need to eliminate those that have only 1 "neighbour" aswell. I believe, its doable for me now, since in the output, there are now geometricaly identical points where there is more then one connection (= groups of atleast 3). Still not sure, how to do it easiest way.
    – Martin
    Commented Nov 1, 2022 at 10:29
  • Added to answer. You should be able to use the Join_Count field. Join_Count >= 3
    – sushi
    Commented Nov 1, 2022 at 15:27
  • That makes sense, will try that later, thanks for your help!
    – Martin
    Commented Nov 1, 2022 at 18:14
0

I would explore creating a very simple model where you iterate by year, so you select all points that are say 2015, then that selection feeds into the Generate Near Table as the input and near features along with your 100m search distance. You can optionally join such information back to your dataset.

3
  • Thanks for your help, I did some kind of combination of model with solution above. One more question, since I am new here - do I have an option to close this thread as solved somewhere, or it is up to moderator or something? :)
    – Martin
    Commented Nov 1, 2022 at 18:20
  • For each answer, under the vote up/down you'll see a tick, you tick it, this gives points to the answerer and also indicates to others that you found a solution to your question.
    – Hornbydd
    Commented Nov 1, 2022 at 20:00
  • 1
    Near table is also a good solution if you want to see which features are closer since it has a 'rank' field. So if you select records with rank >= 3 and year = 2015, then you'd have ID numbers for records that have at least 3 near features and are all year 2015. The spatial join will give you distances too, but I don't think it ranks them.
    – sushi
    Commented Nov 1, 2022 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.