You are here:
Extensions
>
Network Analyst
>
Performing network analysis
About finding the closest facility
When finding closest facilities, you can specify how many to find and whether the direction of travel is toward or away from them. Once you've found the closest facilities, you can display the best route to or from them, return the travel cost for each route, and display directions to each facility.
When finding the closest facility, you can specify a cutoff cost beyond which ArcGIS Network Analyst should not search for a facility. For instance, you can set up a closest facility problem to search for hospitals within a 15-minute drive time of the site of an accident. Any hospitals that take longer than 15 minutes to reach will not be included in the results.
The hospitals are referred to as facilities, and the accident is referred to as an incident. ArcGIS Network Analyst allows you to perform multiple closest facility analyses simultaneously. This means you can have multiple incidents and find the closest facility (or facilities) to each incident.
Finding the closest facility to an incident follows the same work flow as other network analyses.
Learn more about the network analysis work flow
Learn more about what is closest facility analysis
Closest facility analysis layer
The closest facility analysis layer stores all the inputs, parameters, and results of closest facility analysis.
Creating a closest facility analysis layer
You can create the closest facility analysis layer by clicking New Closest Facility under Network Analyst, from the Network Analyst Window.
When a new closest facility analysis layer is created, it shows up on the Network Analyst Window with four categories: Facilities, Incidents, Barriers, and Routes.
Additionally, it shows up in the table of contents as a composite layer, Closest Facility (or Closest Facility 1, Closest Facility 2, and so on), composed of four feature layers: Facilities, Incidents, Barriers, and Routes. Each of these feature layers has default symbology that can be modified on its Layer Properties dialog box.
Components of a closest facility analysis layer
Facilities feature layer
This layer stores the network locations that are used as facilities in closest facility analysis.
The Facilities layer is classified by default in three classes: Located, Unlocated, and Error. You can modify the symbology of each of these types in the Layer Properties dialog box of the Facilities layer. You can modify the symbol, color, or text symbol for any type of facility. When a new closest facility analysis layer is created, the Facilities layer has no features. It is populated only when network locations are added into it.
Incidents feature layer
The layer stores network locations used as incidents for closest facility analysis. The Incidents feature layer behaves in the same manner as the Facilities feature layer.
It is empty when the closest facility analysis layer is created and is populated when incidents are added interactively, by geocoding an address, or loading from another feature class or feature layer.
Barriers feature layer
Barriers are used in closest facility analysis to denote points where a closest facility route cannot traverse. The Barriers layer is classified by default into three types: Located, Unlocated, and Error. The symbology of each can be modified on the Layer Properties dialog box of the Barriers layer. The Barriers layer functions as any other feature layer in ArcMap. When barriers are added, the Barriers list on the Network Analyst Window displays the newly added barrier, along with all existing barriers.
Routes feature layer
The Routes layer stores the resultant paths of the closest facility analysis. As with other feature layers, its symbology can be accessed from the Layer Properties dialog box.
The Routes layer on the Network Analyst Window is empty until the analysis is complete. Once the closest facility is found, the route from the incident to the facility is displayed on the Network Analyst Window.
Network locations for closest facility analysis
Facilities, incidents, and barriers are the network locations used in closest facility analysis.
Facility properties
ObjectID: The unique ID of the network location is assigned automatically.
Name: The name for a facility is assigned automatically when it is added to the map.
- When a facility is added interactively to a new map, with no other network locations, it is named 'Graphic Pick 1'. Subsequent network locations interactively added in the session are Graphic Pick 2, Graphic Pick 3, and so on.
- A geocoded facility is named with its address (for instance, 1341 Parker Ave).
- When network locations are loaded from feature classes or feature layers (in ArcMap or using the Add Locations tool in ArcToolbox), the name of the locations can be assigned from any text field in the feature class. ArcGIS searches for and assigns the name field for the feature class based on a list of candidate fields.
CurbApproach: The CurbApproach property allows approach to a network location from only one side of the vehicle. You can use this property for any closest facility analysis that requires the vehicle to approach the facility from one side only.
Status: If a facility is located on the network, the value of the Status property is set to OK. If it cannot be located, the value of the Status property is set to Unlocated.
Attr_[Impedance] (for instance, Attr_Drivetime, where Drivetime is the impedance for the network): This property stores the value of impedance for the network location. For example, if you are finding the closest three fire stations from a fire incident using Drivetime as impedance, the property Attr_Drivetime can be used to store the amount of time spent at the facility. In such a case, the Attr_Drivetime can store the "chute" time, or turnout time, of each fire station. Turnout time is the time it takes a crew to secure the station, don the appropriate persona protective equipment, and exit the fire station.
Cutoff_[Impedance] (for instance, Cutoff_Drivetime, where Drivetime is the impedance for the network): While searching for the closest incident from a facility, ArcGIS Network Analyst can use a cutoff value for the impedance. Any incident beyond the cutoff value will not be searched. If the Cutoff_[Impedance] is not set for a facility, the closest facility analysis will use the default cutoff value set in the analysis settings on the Layer Properties dialog box. If the default cutoff value is also not set, then the closest incident will be found, regardless of how far it may be.
Incident properties
ObjectID: The unique ID of the network location is assigned automatically.
Name: The name for an incident is assigned automatically when it is added to the map.
- When an incident is added interactively to a new map, with no other network locations, it is named 'Graphic Pick 1". Subsequent network locations interactively added in the session are Graphic Pick 2, Graphic Pick 3, and so on.
- A geocoded incident is named with its address (for instance, 1341 Parker Ave).
- When network locations are loaded from feature classes or feature layers (in ArcMap or using the Add Locations tool in ArcToolbox), the name of the locations can be assigned from any text field in the feature class. ArcGIS searches for and assigns the name field for the feature class based on a list of candidate fields.
TargetFacilityCount: This property stores the number of facilities that need to be found for the incident. If this property is not set, the analysis uses the number of facilities to find, which is set on the Analysis Settings tab on the Layer Properties dialog box.
CurbApproach: The CurbApproach property allows approach to a network location from only one side of the vehicle. You can use this property for any closest facility analysis that requires the vehicle to approach the incident from one side only.
Status: If an incident is located on the network, the value of the Status property is set to OK. If it cannot be located, the value of the Status property is set to Unlocated.
Attr_[Impedance] (for instance Attr_Drivetime, where Drivetime is the impedance for the network):This property stores the value of impedance for the network location. For example, if you are finding the closest three fire stations from a fire incident using Drivetime as impedance, the property Attr_Drivetime can be used to store the amount of time spent at the fire incident. This could be the time it takes for fire stations to get inside and reach the actual fire.
Cutoff_[Impedance] (for instance Cutoff_Drivetime, where Drivetime is the impedance for the network):While searching for the closest incident from a facility, Network Analyst can use a cutoff value of impedance. Any incident beyond the cutoff value will not be searched. If the Cutoff_[Impedance] is not set for a facility, the closest facility analysis will use the default cutoff value set in the analysis settings on the Layer Properties dialog box. If the default cutoff value is also not set, then the closest incident will be found, regardless of how far it may be.
Barrier properties
ObjectID: The unique ID of the network location is assigned automatically.
Name: The name for a barrier is assigned automatically when it is added to the map.
- When a barrier is added interactively to a new map, with no other network locations, it is named 'Graphic Pick 1". Subsequent network locations interactively added in the session are Graphic Pick 2, Graphic Pick 3, and so on.
- A geocoded barrier is named with its address (for instance, 1341 Parker Ave).
- When network locations are loaded from feature classes or feature layers (in ArcMap or using the Add Locations tool in ArcToolbox), the name of the locations can be assigned from any text field in the feature class. ArcGIS searches for and assigns the name field for the feature class based on a list of candidate fields
CurbApproach: The CurbApproach property of a barrier controls navigation on the network element on which the barrier is located. If a barrier has its curb approach property set to "Either side of vehicle", the barrier will restrict traversal over the edge in both directions. If the curb approach is set to "Right side of vehicle", the barrier will restrict all routes that have the barrier on the right. All routes that traverse the same edge but have the barrier on the left side of the vehicle will not be affected by the barrier.
Status: If a barrier is located on the network, its value of the Status property is set to OK. If it cannot be located, the value of the Status property is set to Unlocated.
Learn more about network locations
Closest facility analysis parameters
Analysis parameters are set up on the Layer Properties dialog box for the analysis layer.
The Analysis Layer Properties dialog box can be accessed by any of the following ways:
- On the Network Analyst Window, click the Analysis Layer Properties button
.
- On the Network Analyst Window. right-click the analysis layer, and click Properties.
- In the table of contents, right-click the analysis layer and click Properties.
- In the table of contents, double-click the analysis layer.
Analysis settings
The following parameters can be set for closest facility analysis:
Impedance: Any cost attribute can be chosen as the impedance, which is minimized while determining the route. For instance, choosing the Minutes attribute results in the quickest route to the closest facility.
Learn more about cost attributes
Restrictions: You can choose which restriction attributes should be respected for calculating the closest facility route. Restrictions, such as Oneway, should be used while finding the quickest route on streets.
Learn more about restrictions
Default cutoff value: While searching for the closest facility, ArcGIS Network Analyst can use a default cutoff value of impedance. Any facility beyond the cutoff value will not be searched. For instance, while locating the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that ArcGIS Network Analyst would search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no hospitals will be returned in the closest facility search. A cutoff value is especially useful when searching for multiple facilities.
Facilities to find: ArcGIS Network Analyst can find multiple closest facilities from an incident. This is useful in situations, such as a fire, where multiple fire engines may be required from different fire stations. ArcGIS Network Analyst can find, for example, the nearest three fire stations to a fire. If you were to use a cutoff cost of 10 minutes, and the three closest stations were at 5, 7, and 11 minutes, then only the first two stations would be returned by the closest facility search.
Travel from: When ArcGIS Network Analyst searches for the closest facility, you can specify whether you want to travel from the incident to the facility or from the facility to the incident. Restrictions, such as Oneway, and impedances, such as Travel Time, can be based on direction of travel, which can affect the result. For instance, a facility may be a 10-minute drive from the incident while traveling from the incident to the facility, but while traveling from the facility to the incident, it may be a 15-minute journey because of different travel time in that direction.
Allow U-turns: While calculating a closest facility route, Network Analyst can be set to allow U-turns everywhere, nowhere, or only at dead ends (also known as cul-de-sacs). Allowing U-turns implies the closest facility route can double back on the same street.
Output shape type: The results of closest facility can be represented by either the true shape, a straight line, or none.
- True shape gives the exact route computed during the closest facility analysis.
- Straight line shape type results in a straight line from incident to facility. The route computed actually uses the street network and returns the same cost as the previous case. However, the symbology is reflected as a single line.
- When the output shape type is set to None, no shape is returned. In all three cases, the properties for the route are the same. This means, in all three cases, only the shapes are different; the cost (Total_Minutes) computed is the same.
Use hierarchy: If the network dataset has a hierarchy attribute, you can choose to use the hierarchy during analysis. Using hierarchy results in a route that prefers the hierarchy of the network and can be used to simulate situations, such as traveling across a city, where you might prefer to use the freeway instead of local streets. Not using a hierarchy yields the exact route across a network, disregarding the hierarchy of the network.
Ignore invalid locations: This allows you to ignore unlocated network locations and find the closest located facility from located incidents only. If this option is not used and you have unlocated facilities or incidents, you cannot find the closest facility.
Directions: With the Directions properties, you can set the units for displaying distance and, optionally, time (if you have a time attribute). Additionally, you can choose to open directions automatically after the generation of a route. (If you choose not to display directions automatically, you can click on the Directions Window button

to display directions).
Accumulation
Under the Accumulations tab, you can choose attributes that should be accumulated and added to the properties of the route.
Network locations
The Network Locations settings are used to find network locations and to set values for their properties.
Learn more about network locations
How to find the closest facility to an incident
Finding the closest facility in ArcMap
- Start ArcMap.
- Click the Tools menu and click Extensions.
- Check Network Analyst.
- Click Close.
- Click the Add Data button
.
- Navigate to the network dataset location.
- Click the network dataset and click Add.
- Click No to add only the network dataset to the map, or click Yes to add all the feature classes that participate in the network to the map.
- If the Network Analyst toolbar is not present, click the View menu, point to Toolbars, and click Network Analyst.
- If the Network Analyst Window is not already open, on the Network Analyst toolbar, click the Network Analyst Window button
.
- On the Network Analyst toolbar, click the Network Analyst dropdown menu and click New Closest Facility.
The Network Analyst Window now contains empty lists of Facilities, Incidents, Routes, and Barriers information. Additionally, the table of contents contains a new Closest Facility analysis layer.
- There are two ways to add facilities: from a point feature class or by adding points to the display.
i. On the Network Analyst Window, right-click Facilities and click Load Locations.
ii. Click the Browse button and choose a point feature class.
iii. Click Add.
iv. Click OK.
Or
i. On the Network Analyst Window, click Facilities.
ii. On the Network Analyst toolbar, click the Create Network Location tool
.
iii. On the display, click the locations where you want to add facility locations.
- If you need to adjust a facility location, on the Network Analyst toolbar, click the Select/Move Network Location tool
.
- There are two ways to add incidents: from a point feature class or by adding points to the display.
i. On the Network Analyst Window, right-click Incidents and click Load Locations.
ii. Click the Browse button and choose a point feature class.
iii. Click Add.
iv. Click OK.
Or
i. On the Network Analyst Window, click Incidents.
ii. On the Network Analyst toolbar, click the Create Network Location tool
.
iii. On the display, click the locations where you want to add incident locations.
- If you need to adjust an incident location, on the Network Analyst toolbar, click the Select/Move Network Location tool
.
- There are two ways to add barriers: from a point feature class or by adding points to the display.
i. On the Network Analyst Window, right-click Barriers and click Load Locations.
ii. Click the Browse button and choose a point feature class.
iii. Click Add.
iv. Click OK.
Or
i. On the Network Analyst Window, click Barriers.
ii. On the Network Analyst toolbar, click the Create Network Location tool
.
iii. Click the locations on the display where you want to add barriers.
- If you need to adjust a barrier location, on the Network Analyst toolbar, click the Select/Move Network Location tool
.
- In the table of contents, right-click the Closest Facility layer and click Properties.
- Click the Analysis Settings tab.
- Set the properties to be used in the analysis.
- If you want to set properties for the directions, click the Directions tab.
- Click OK.
- On the Network Analyst toolbar, click the Solve button
.
Find the closest facility using a tool
- Start ArcCatalog or ArcMap.
- Click the Show/Hide ArcToolbox Window button
to show the ArcToolbox window.
- Expand the Network Analyst toolbox.
- Expand the Analysis toolbox.
- Double-click Make Closest Facility Layer.
- Fill in the parameters for this tool.
Learn more about the Make Closest Facility Layer tool
- Click OK to run the tool.
- Double-click the Solve tool.
- Fill in the parameters for this tool.
Learn more about the Solve tool
- Click OK to run the tool.