I have a feature class of companies where each may have multiple locations (for example, company A may have a cluster of points associated with it). For each company, I used the Standard Distance tool to create a feature class of circles, which surrounds the group of points for that company that is within 1 standard distance of the mean point. See the image below:
I highlighted the points that belong to a company and the standard distance circle for those group of points (the big green circle) for that company.
What I need to do is to remove all the points that fall outside a company's standard distance circle. So in the image, I need to remove the lone highlighted point in the top right corner among the cluster of red points. I need to do this for every company in the dataset (around 33,000 of them).
Here is what I have tried:
- Use the Select Layer by Attribute tool two times to select company A, for example, in
- the point feature class containing the points belonging to company A
- the standard distance circle for company A
- Use the Clip tool to keep the points for company A that fall inside company A's standard distance circle
- Do 1 and 2 for every company in the dataset
I can write a Python script to execute this, but given that there are 33,000 companies, my sense is that this will be slow. Any suggestions for a more direct approach?