Average Nearest Neighbor

01-24-2012 05:23 AM
New Contributor

Using Model Builder, I created a model that calculates Average Nearest Neighbor scores for a large number of points in a region. They points belong to many sub-regional zones. So I use Iterate Feature Selection to iteratively calculate Average Nearest Neighbor scores for points in each zone. I have attached a screen shot of the model. My problem is as follows: Average Nearest Neighbor tool requires at least two features in a zone to work (of course!). But in my dataset, there are zones that have only one observation. So my model stops when it encounters the first zone that has only one point and gives an error message. I think I can get around this problem by manipulating my dataset, such as deleting those zones/points before running my model and then adding them back in the system after model run for consequent analysis. But I am wondering if it is possible to keep these observations in the dataset, and when the model encounters a zone with only one point, it would not stop but rather either leave a null value for the Nearest Neighbor Score or enter an artificially high number, e.g. 999999 as the score, and continue to process remaining zones/points in the dataset. Having such a feature will help me a lot, since I need to run this model for a number of datasets.

Any help would be highly appreciated. Thanks.
0 Kudos
0 Replies