Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need to perform a near analysis to assign cases in one feature class to their nearest match on an attribute in a different feature class (ex: Tutors and Tutees need to be paired by same language spoken). I have not been able to find a way to do this. The closest I have reached to simplifying this process is to perform a split by attribute on the values for the matching variable. So instead of having all tutors in one feature class, I now have n language number of feature classes containing tutors and n language number of feature classes containing tutees. I then plan on performing a near analysis between each feature class. However this is extremely tedious and may result in 100+ near analyses needing to be performed because there are other criteria I will need to match independently on in a similar way.

Is there a better approach?

Much thanks in advance.

Edit: The near must be performed between two different layers to preserve the different roles of individuals being matched. I am new to learning modelbuilder so any ideas on conditionals, or iterators that could determine the "nearest" match on a shared attribute for points housed into two different layers would be much appreciated!


1 Answer 1

Near by Group Something like this sounds like what you need.

Conceptually, this question can be answered by the Near tool (what is the nearest feature?). However, the question also contains a constraint *(with the same attributes*?) that is not directly supported by the Near tool. To answer the full question additional ModelBuilder techniques must be used, along with the Near tool, to create a custom workflow (this could also be done with scripting, but this entry focuses on a ModelBuilder solution). In ArcGIS 10.0, new iterator functions were added to ModelBuilder to allow for iterative or looping logic to be added to geoprocessing models. One of these model iterators, Iterate Feature Selection, allows for attribute groups to be designated and iteratively selected. Using selection sets output by the iterator allows for features belonging to the same attribute group to be iteratively fed into the Near tool – this will answer the question of which is the nearest feature with the same attributes.

Thanks for the quick response! Something like near by group would work except applied to two different layers. It appears that near by group works to match points within the same layer sharing the same attribute. Is there a way to ensure that the near feature and the input feature being fed into the near tool are the same value? –  ajeedee May 17 '13 at 20:50

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .