Find Nearest

Note:

This tool is now available in Map Viewer, the modern map-making tool in ArcGIS Enterprise. To learn more, see Find Closest.

Find Nearest The Find Nearest 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:

To run the Find Nearest tool using a line distance, the portal's hosting server must be licensed with an ArcGIS Server Advanced license. To run the Find Nearest tool using travel modes, the portal's hosting server must be licensed with an ArcGIS Server Advanced license or an ArcGIS Server Standard license that includes the ArcGIS Network Analyst extension.

Find Nearest also requires the following directions and routing services to run with travel modes:

  • Closest Facility (Asynchronous)
  • Routing Utilities

For more information, see Configure utility services.

Workflow diagram

Find Nearest workflow diagram

Terminology

TermDescription

Geodesic

Refers to a line drawn on a sphere. A geodesic line drawn on the globe represents the curvature of the earth's geoid.

Euclidean distance

A straight-line distance as measured on a flat surface (that is, a Cartesian plane).

Example

The director of Safety Services wants to determine which fire station in the city is closest to each of the schools in terms of driving time. The director wants to use this information, which can be collected using Find Nearest, to set primary and secondary responder stations for each school in case of an emergency.

Usage notes

Find Nearest requires two inputs: an input feature layer and a near feature layer. There is a maximum of 5,000 features allowed in each feature layer.

The near distance can be based on a line distance or several different travel modes using time or distance as the measure for nearest features. Both feature layers can be points, lines, or polygons when using straight-line distance. Travel mode options are only enabled if both feature layers are points.

Some travel modes have an option for using traffic conditions. When traffic conditions are used, they may be based on live conditions or typical conditions for a specified day of the week and time. Live traffic conditions can be offset up to 4 hours from the current time. Times for typical conditions can be set by 15-minute intervals for the entire day and night.

Travel modes can be configured by the administrator of your organization. The administrator can also add new travel modes or remove travel modes that are not necessary for your organization. The default distance measure will be in Miles or Kilometers, depending on the Units setting in your profile.

Travel ModeDescriptionSpecifications

Walking Time Walking Time

Follows paths and roads that allow pedestrian traffic and finds solutions that optimize travel time. The walking speed is set to 5 kilometers per hour.

Walking speed is set at 5 kilometers (3.1 miles) per hour. The walking speed can be configured by the administrator of your organization.

Rural Driving Distance Rural Driving Distance

Models the movement of cars and other similar small automobiles, such as pickup trucks, and finds solutions that optimize travel distance. Travel obeys one-way roads, avoids illegal turns, and follows other rules that are specific to cars but does not discourage travel on unpaved roads.

None

Driving Time Driving Time

Models the movement of cars and other similar small automobiles, such as pickup trucks, and finds solutions that optimize travel time. Travel obeys one-way roads, avoids illegal turns, and follows other rules that are specific to cars. When you specify a start time, dynamic travel speeds based on traffic are used where traffic data is available.

Use traffic is unchecked by default. The driving speed will be based on historical and live traffic data.

Traffic can be based on live conditions or typical conditions for a specified day of the week and time.

Verify whether traffic data is available in your region by clicking the See availability link in the tool pane.

Driving Distance Driving Distance

Models the movement of cars and other similar small automobiles, such as pickup trucks, and finds solutions that optimize travel distance. Travel obeys one-way roads, avoids illegal turns, and follows other rules that are specific to cars.

None

Walking Distance Walking Distance

Follows paths and roads that allow pedestrian traffic and finds solutions that optimize travel distance.

None

Rural Driving Time Rural Driving Time

Models the movement of cars and other similar small automobiles, such as pickup trucks, and finds solutions that optimize travel time. Travel obeys one-way roads, avoids illegal turns, and follows other rules that are specific to cars but does not discourage travel on unpaved roads. When you specify a start time, dynamic travel speeds based on traffic are used where it is available.

Use traffic is unchecked by default. The rural driving speed will be based on historical and live traffic data.

Traffic can be based on live conditions or typical conditions for a specified day of the week and time.

Verify whether traffic data is available in your region by clicking the See availability link in the tool pane.

Trucking Time Trucking Time

Models basic truck travel by preferring designated truck routes and finds solutions that optimize travel time. Routes must obey one-way roads, avoid illegal turns, and so on.

Follows rules applicable to heavy trucks.

The trucking speed will be based on either historical average speeds for automobiles or the posted speed limits for trucks, whichever is smaller.

Use traffic is unchecked by default. The trucking speed will be based on historical and live traffic data but will not exceed the posted trucking speed.

Traffic can be based on live conditions or typical conditions for a specified day of the week and time.

Trucking Distance Trucking Distance

Models basic truck travel by preferring designated truck routes and finds solutions that optimize travel distance. Routes must obey one-way roads, avoid illegal turns, and so on.

Follows rules applicable to heavy trucks.

None

The maximum number of near locations and the search range can be limited. By default, the maximum number of near locations found is 1. If the Limit the number of nearest locations to box is unchecked, the tool's limit of 100 locations will be applied.

The default search range is limited to 100 Miles (US Standard setting) or 100 Kilometers (Metric setting). A search range can be specified in Miles, Yards, Feet, Kilometers, or Meters.

The Select barrier layers parameter can be used to specify one or more features that act as temporary restrictions when traveling on the underlying streets.

The result outputs are two layers: one with each of the nearest features and one with lines connecting the input features to the near features. If you select Include route layers, each route from the result is also saved as a route layer. A route layer includes all the information for a particular route, such as the stops assigned to the route and the travel directions.

If Use current map extent is checked, only the features that are visible within the current map extent will be considered as start and potentially nearest features. If unchecked, all features in the input layer will be considered, even if they are outside the current map extent.

Limitations

  • There is a limit of 5,000 features in each of the two input layers.
  • You must be granted the network analysis privilege to use travel modes.
  • Travel modes are only enabled when point features are used as input.
  • The maximum number of near locations is 100.
  • The processing time is dependent on the number of start locations, the number of near locations, and the maximum search range.
  • The maximum number of route layers that can be created is 1,000. If the result contains more than 1,000 routes and Include route layers is checked, the tool will only create the output feature service.
  • An error will occur if the tool takes more than 60 minutes to execute when using travel modes. If this error occurs, try rerunning the analysis with fewer input features.
  • You can specify up to 250 features to act as point barriers.
  • If the number of street features intersected by all the line barriers exceeds 500, the tool returns an error.
  • If the number of street features intersected by all the polygon barriers exceeds 2,000, the tool returns an error.

How Find Nearest works

The Find Nearest tool 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).

The Live traffic option uses the current time as the departure. The traffic speed is predicted for the trip using live speeds, historical speeds, and current events, such as weather.

When typical conditions for a day of the week and time are used, the travel speeds are based on historical speeds averaged across 5-minute intervals for the entire week.

When either traffic condition is used, the Find Nearest tool takes into consideration the changing traffic conditions based on elapsed time from departure.

When lines or areas are used as input, the nearest location is found using the distance from or to the nearest point along the line or on the boundary of the area.

Creating route layers is useful if you want to share the individual routes with other members in your organization or if you want to further modify the routes using the Directions button in Map Viewer Classic. The route layers use the name provided for the feature layer as a prefix, and the route name generated as part of the analysis is added to create a unique name for each route layer.

Similar tools

Use Find Nearest to find the features that are closest to your input layer. Other tools may be useful in solving similar but slightly different problems.

Map Viewer Classic analysis tools

If you want to find features within a specified distance of input features without limiting or ranking the number of features that are found, use the Find Existing Locations tool.

If you want to measure the time or distance between pairs of features, use the Connect Origins to Destinations tool.

ArcGIS Pro analysis tools

The Find Nearest tool performs a similar function to the Generate Near Table, Near, and Point Distance tools and the Closest Facility solver in ArcGIS Network Analyst extension.