How To: Determine the distance between a point feature and the nearest point feature in another layer
The instructions provided describe how to determine the distance between the nearest point features from two different layers. For instance, to find the nearest distance between point features from a School layer and a Hospital layer.
There are two ways to do this, by using geoprocessing tools, or by creating a spatial join.
Use geoprocessing toolsUse the Near tool or the Generate Near Table tool. For more information on how to use these tools, refer to the following ArcGIS Web Help topics: Near and Generate Near Table.
Note: The Near tool and the Generate Near Table tool are only available with an ArcGIS for Desktop Advanced license.Alternatively, use the Point Distance tool to calculate the distance between all point pairs in two point layers. For more information, refer to following Web Help topic: Point Distance.
Create a spatial joinBefore creating the join, re-project the layers and data frame to have the same projection. Use either the Batch Project or the Project tool to change the coordinate system of the input layer. Refer to the following ArcGIS Web Help links: Batch Project and Project.
- Create a spatial join by right-clicking the desired layer in the Table Of Contents > Joins and Relates > Join.
- In the Join Data window, select another layer to join with the desired layer.
- In the second option of the dialog, under You are joining: Points to Points, select the second option, to give each point all the attributes of the point in the layer being joined that is closest to it.
- Specify the output location, and click OK. A new layer containing the nearest distances is created.
- To determine the distance between the features, right-click the newly created layer, and select Open Attribute Table. In the table, the distance values are created in the Distance field.
Note: To convert the distances' values to other units of measurement, create a new field with the Double data type, and populate the distance values using the Field Calculator. For more information, refer to the following link, About distance units and editing.