Select by location, but only return a certain number of points - is that possible?

1401
6
Jump to solution
06-09-2021 01:42 PM
NonieCastro1
New Contributor II

I have a list of points (addresses with lat/long), let's call that the Target List. I have another list of points (more addresses with lat/long) - let's call that the Master List.

How can I find the closest [enter a number] of points from the Master List that are closest to the Target List? So - not every point in a radius, only the closest 100, or 500 or 1,000 points?

Hopefully the result would be a table with Location 1, then 100 matches, then location 2 and 100 matches, etc.

Thank you so much!

 

0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed Contributor

Generate Near Table should work for you.

Uncheck "Find only closest feature" in order to specify a limit to "Maximum number of closest matches".

JayantaPoddar_0-1623312167790.png

 



Think Location

View solution in original post

6 Replies
DanPatterson
MVP Esteemed Contributor

not unless you want to iterate the distance for each source location until you get your threshold count for the target layer

Select Layer By Location (Data Management)—ArcGIS Pro | Documentation

even near as table needs a distance and not a count and you would end up with a ridiculously large table for your sample "closest" numbers.

That would leave the iterative coding sorted by distance


... sort of retired...
JayantaPoddar
MVP Esteemed Contributor

Generate Near Table should work for you.

Uncheck "Find only closest feature" in order to specify a limit to "Maximum number of closest matches".

JayantaPoddar_0-1623312167790.png

 



Think Location
DanPatterson
MVP Esteemed Contributor

@JayantaPoddar ... True... but that will result in that ridiculously sized table I was referring to,


... sort of retired...
JayantaPoddar
MVP Esteemed Contributor

You could be right. I have just laid out the feasibility of the process, rather than focusing on the size of the output table. I have left that decision at the discretion of the user. 



Think Location
NonieCastro1
New Contributor II

THANK YOU! Thank you so much - I tried it this morning, this seems to be just what I needed. I mean, yes - the table is enormous, but it we can work with that. 

0 Kudos
NonieCastro1
New Contributor II

Thank you again! I tried another, larger list of points, and just to be 100% certain, double checked the resulting table against the map - worked like a charm! What a relief, I was so stumped. You've been an enormous help.

0 Kudos