I have two sets of points- list A and list B. I need to efficiently select the points from list B that are furthest from points in list A.
The reason Near Table isn't working out is because of the number of (redundant) records showing the distance of each point on list B to every single point on list A. That's 9000 entries (A) x 500 entries (B) for a total of 4,500,000 records generated by the near table.
I would like to end up with an ordered list of points from list B that are furthest away from any points on list A.
It seems like a simple thing to ask but not so simple to do.
How can I approach this?
Solved! Go to Solution.
Not sure I completely understand, but to get the nearest distance between construction and toxic sites, use Near (outputs only nearest features) rather than Generate Near Table (potentially outputs all combinations). Then, sort the feature class by near distance.
Some questions to help clarify this:
1. Is the issue technical - i.e. the analysis bogs down/software crashes due to the large amount of records?
2. Is the issue that their are many resulting Near records and uncertainty on how to query these results down to get the final answer?
Chris Donohue, GISP
1. No technical issue. I did an experiment with a smaller data set. The application produces the table after some time. I really don't mind letting it run overnight to get 4.5 million records if that's what needs to be done.
2. Yes, there are way too many records produced. It's not the amount of them but their redundancy. Each point in B is matched to all points in A, multiplying the amount of records. I suspect that there is a way to leave just the highest-distance records in the near table for each point from the initial list of points B.
It can be done with Python, but I don't know if I understand the end result you are looking for. Your way of describing what you want is very confusing. Here is what I think you want:
1. For any given point in A (shape) find the distance to the closest point in B along with the point B ObjectID (Attributes).
2. Sort the points in A by the distance to B in descending order so that the furthest distance point in A is at the top of the list.
Is that correct? Or perhaps rule 1 should be : For any given point in A find the distance to the furthest point in B along with the Point B ObjectID.
This assumes you want the point shape from A and just the attributes from B. But your description could mean that you want the to keep the point shape in B and attribute it with the distance and ObjectID of a point in A. Or do you want a table with the coordinates of both points that meet your rule 1 so that you could make an XY point layer based on either the location in A or the location in B?
So basically at the end should there be 9000 records (one for each point in A) or 500 records (one for each point in B).
Richard, I think you got it right in your first description.
I must find the closest distances between points on separate lists, then sort them so the furthest distance is at the top of the list as you've said.
Here is a way to illustrate the problem.
Suppose I have a list of potential construction sites and a list of toxic waste facilities. I want to list the construction sites that are furthest away from all waste facilities. I'm showing each site with a point, not a polygon.
So I want to end up with the theoretical 500 sites sorted by distance to the nearest 9000 hazards, for a total of 500 records.
Not sure I completely understand, but to get the nearest distance between construction and toxic sites, use Near (outputs only nearest features) rather than Generate Near Table (potentially outputs all combinations). Then, sort the feature class by near distance.
I think this is it. Please let try this and get back to you.
Are you after nearest or farthest points? You say "furthest" a lot but then you also say "closest" at one point.
My interpretation is that she's looking for "the construction site farthest from the nearest toxic waste facility," which makes sense.
I think part of what is confusing people is semantics, particularly the use of the word "furthest." Assuming no two construction sites are exactly the same distance from a waste facility, you will only have one construction site that is furthest away. If by furthest you mean far, then a definition of what is far and what is close would be helpful. Or, are you looking to simply determine the distance from each construction site to each waste facility?