Finding the nearest feature
A spatial join joins the attributes of two layers based on the location of the features in the layers. Like joining two tables by matching attribute values in a field, a spatial join appends the attributes of one layer to another.
The nearest feature is defined as the feature that is geographically closest to another one. Proximity is based on straight-line distance between features.
- Right-click the layer to which you want to join attributes, point to Joins and Relates, then click Join.
You can also click the Table Options button on an open table window to access the Join Data dialog box.
- Click the What do you want to join to this layer? drop-down arrow and click Join data from another layer based on spatial location.
- Click the Layer drop-down arrow and click the name of the layer whose attributes you want to join.
If the layer is not currently part of the map, click the Browse button to search for it on disk.
Each point is given all the attributes of the line that is closest to it and a distance field showing how close that line is.
- Type the name of the output shapefile or feature class.
- Click OK.
A new layer is added to the map.