Is This Content Helpful?
We're glad to know this article was helpful.
In ArcGIS Online, the Find Nearest tool requires two inputs: an input feature layer, and near feature layer. Both input layers cannot be the same layer. In some instances, it may be desirable to find the first nearest location within the same layer. This can be done by duplicating the layer in the map viewer and using the duplicated layer as one of the input layers. However, when running the tool with both the layer and the duplicated layer as inputs, the data in the table shows zero values for the distance. In some cases, the following error is returned:
Error: Find Nearest failed.
This issue occurs because the closest point identified by the tool is identical to the origin point. This results in null linear distance geometry, hence no features can be created.
As a workaround, set the limit number of the nearest locations to two (2) locations before running the Find Nearest tool, and filter the results with a linear distance of more than zero. Follow the steps below: