The Find closest tool uses either a line distance or a travel mode to measure between input features and near features. For each input feature, the specified number of near features is ranked by distance from the input feature.
Note:
You need to sign in to use this tool. This tool consumes credits.
This tool requires the following user type and configurations:
- Creator, Professional, or Professional Plus user type
- Publisher, Facilitator, or Administrator role, or an equivalent custom role
The Network Analysis privilege is required to run the tool using a travel mode. The output is a hosted feature layer. Find closest includes configurations for input layers, analysis settings, and result layers.
Use the following input layers parameters:
- Features to search from—Used to select the layer for which the closest features are found. The layer can contain up to 5,000 features. When lines or polygons are used as inputs, the closest location is found using the distance from or to the closest point along the line or on the boundary of the polygon.
- Features to find—Used to select the layer from which features are found based on their proximity to the input layer. The layer can contain up to 5,000 features.
- Measurement
type—Used to choose the
measurement by which the closest features are found. The method can
be
line
distance
or a travel
mode. Find closest uses a geodesic method when finding features with a straight-line distance rather than a Euclidean method. Geodesic lines account for the actual shape of the earth (an ellipsoid, or more properly, a geoid). Distances are calculated between two points on a curved surface (the geoid) as opposed to two points on a flat surface (the Cartesian plane).
Note:
Travel modes are only available if you have the Network Analysis privilege and point features are used as the inputs.
- Limit the search
range—This toggle button is used to determine whether a
custom maximum search range is used by
the tool. If enabled,
Max search
range is available. If not
enabled, the search range is unlimited.
When a limit is set on the search range, it's possible that the tool won't find any nearest locations within that range, or that fewer locations are found than the maximum number of nearest locations you specify.
- Max search range and Max search range (minutes) determine the maximum distance or time required to travel between the input points and the points returned as closest features. Features outside of the search range will not be returned. This parameter is available if Limit the search range is enabled.
- Search range units is used to select the distance units (miles, kilometers, meters, or feet) for measuring the maximum search range for distance-based measurement types.
Result layers
Result layers include the following parameters:
- Number of results—Can save up to a maximum of 100 results.
- Result layer name—Specifies the name of the layer that is created and displayed. The name must be unique. If a layer with the same name already exists in your organization, the tool will fail and you will be prompted to use a different name.
Considerations
Be aware of the following when using this tool:
- There is a limit of 5,000 features in each of the two input layers.
- Travel modes are only enabled when point features are used as inputs.
- The maximum number of closest locations is 100.
- The processing time is dependent on the number of start locations, the number of near locations, and the maximum search range.
- An error will occur if the tool takes more than 60 minutes to run. If this error occurs, try rerunning the analysis with fewer input features.
- The straight-line distance between input locations from the start locations layer and nearest locations layer cannot exceed 27 miles (43.45 kilometers) when the travel mode is Walking Time or Walking Distance.
Outputs
This tool includes the following outputs:
- One layer with the closest features. The geometry of the output depends on the geometry of the near features.
- One line layer with the lines connecting the input features to the closest features.