Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • there's a behavior across the majority of gp tools which is: if input is a layer with a selection, only the selected features will be used. What you could do is loop over each admin boundary and use SelectLayerByLocation to select cities and points in the second shapefile, then run Near or GenerateNearTable on the cities. Commented Mar 3, 2022 at 1:20
  • What result did you get from running the analysis N times with selection sets for N administrative units? Commented Mar 3, 2022 at 1:21
  • @Vince If you are referring to running the near analysis unconditional on points lying within the same boundary, I got mixed results. Some points matched accordingly, but others were clearly matched to points in a nearby, but not the same, region Commented Mar 3, 2022 at 1:45
  • @gotchula I think this makes sense, so I will try to give it a go and see how it goes Commented Mar 3, 2022 at 1:46
  • @gotchula Related to this, say I instead wanted to generate a NearTable with the top X nearest points in the second file, and the region they belong to, regardless of whether it is the same as the points in the first shapefile or not. How could I proceed? (This is because, for my purposes, it may be informative to see potential closest matches even if they are not within the boundaries) Commented Mar 3, 2022 at 2:01