Skip to main content
I am trying to take a point feature class and find the nearest neighbor from another point feature class but keep it within a certain group. I thought the group by feature would be all I required inside the neighborfinder but when I use this field, my inputs all come out the "unmatched base" port.

 

 

My inputs are zipcodes as point feature class (base) and cities as points (candidate). I want to associate each city to a zipcode. This works fine. However, I am getting a few that are being associated to the wrong state. So, I want to make sure that it finds the nearest neighbor but stays within the state. I have a state_abbr field in the zipcode data. But, like I said, when I set this field to the group by and run the workspace, everything comes out unmatched.

 

 

Is there a way to do this association without the neighbor finder?

 

 

Thanks
Hi,

 

 

The "Group By" should work as expected if both base and candidate features have a common grouping attribute with the same name.

 

Do the cities (candidates)  have the "state_abbr" field?

 

 

Takashi
yes, you must first associate both base and candidates the attribute(s) intended to be used by the "groupby".

 

 

You must first use for instnce a spatial relator or point on area to associate the states to both feature classes.
Thanks! I did not have both base and candidate with the same name exactly since I thought it would just use the base.

Reply