Closest facility analysis layer

This topic describes the closest facility analysis layer's feature classes and analysis properties.

Learn more about the closest facility solver

Facilities feature class

The Facilities feature class stores the network locations that are used as the starting or ending points in closest facility analyses.

When a closest facility analysis layer is created, the Facilities class is empty. It is populated only when network locations are added to it. A minimum of one facility and one incident are necessary to solve the analysis.

Facilities: Input fields

Input fieldDescriptionData type

ObjectID

The system-managed ID field.

Object ID

Shape

The geometry field indicating the geographic location of the network analysis object.

Geometry

Name

The name of the network analysis object.

Text

Attr_[Cost]

(for instance, Attr_DriveTime, where DriveTime is the travel cost)

This property stores an extra cost for the network location.

Take the example of finding the three closest fire stations to a fire incident using DriveTime as the impedance. Attr_DriveTime can store the turnout time for the facility. Turnout time is how long it takes a crew to put on the appropriate protective equipment and exit the fire station.

Double

Cutoff_[Cost]

(for instance Cutoff_DriveTime, where DriveTime is the travel cost)

While searching for the closest incident from a facility, Network Analyst can use a cutoff value for the impedance. Any incident beyond the cutoff value is not searched.

If the Cutoff_[Cost] is not set for a facility, the analysis uses the default cutoff value specified on the Closest Facility Layer tab for this analysis layer. If a default cutoff value is not set there either, the closest incident is found, regardless of how far it may be.

Double

Network location fields

  • SourceID
  • SourceOID
  • PosAlong
  • SideOfEdge
  • SnapX
  • SnapY
  • SnapZ
  • DistanceToNetworkInMeters

Together, these properties describe the point on the network where the object is located.

Learn more about locating inputs on a network

  • Long
  • Long
  • Double
  • Long
  • Double
  • Double
  • Double
  • Double

CurbApproach

The CurbApproach field specifies the direction a vehicle may arrive at and depart from the network location. The shortest path between two points can change depending on the direction of travel permitted when arriving at or departing from a location. There are four choices (their coded values are shown in parentheses):

  • Either side of vehicle (0)—The vehicle can approach and depart the point in either direction. U-turns are allowed. Choose this setting if a vehicle can make a U-turn at the location or if it can pull into a driveway or parking lot and turn around.
  • Right side of vehicle (1)—When the vehicle approaches and departs the point, the curb must be on the right side of the vehicle. A U-turn is prohibited.
  • Left side of vehicle (2)—When the vehicle approaches and departs the point, the curb must be on the left side of the vehicle. A U-turn is prohibited.
  • No U-Turn (3)—When the vehicle approaches the point, the curb can be on either side of the vehicle; however, the vehicle must depart without turning around.
Learn more about U-turns and curb approach

For closest facility analyses, the No U-turn (3) value functions the same as Either side of vehicle (0).

Long

Facilities: Input/output fields

Input/output fieldDescriptionData type

Status

Indicates the status of the point with respect to its location on the network and the outcome of the analysis. The possible values are the following:

  • 0 (OK)—The point was located on the network.
  • 1 (Not Located)—The point was not located on the network and consequently was not included in the analysis.
  • 2 (Network element not located)—The network element identified by the point's network location fields can't be found. This can occur when a network element where the point should be was deleted, and the network location was not recalculated.
  • 3 (Element not traversable)—The network element that the point is located on is not traversable. This can occur when the element is restricted by a restriction attribute.
  • 4 (Invalid Field Values)—Field values fall outside a range or coded-value domain. For example, a negative number exists where positive numbers are required.
  • 5 (Not Reached)—The point can't be reached by the solver. The point may be on a separate, disconnected area of the network from the other inputs, or barriers or restrictions prevent travel to or from the point.
  • 6 (Time window violation)—The point could not be reached within the designated time windows. This status only applies to network analysis types that support time windows.
  • 7 (Not located on closest)—The closest network location to the point is not traversable because of a restriction or barrier, so the point has been located on the closest traversable network feature instead.

If a facility is not included in the solution because of specified cutoffs or a designated number of facilities to find, the status does not update to Not reached (5).

Long

Incidents feature class

The Incidents feature class stores the network locations that are used as starting or ending points in closest facility analyses. Whether starting or ending points, incidents are always on the opposite end of a route from the connected facility.

When a closest facility analysis layer is created, the Incidents class is empty. It is populated only when network locations are added to it. A minimum of one facility and one incident are necessary to solve the analysis.

Incidents: Input fields

Input fieldDescriptionData type

ObjectID

The system-managed ID field.

Object ID

Shape

The geometry field indicating the geographic location of the network analysis object.

Geometry

Name

The name of the network analysis object.

Text

TargetFacilityCount

This property stores the number of facilities that need to be found for the incident.

A default value for the number of facilities to find can be set on the Closest Facility Layer tab for this analysis layer. Values specified in the TargetFacilityCount field override that default value.

Long

Attr_[Cost]

(for instance, Attr_DriveTime, where DriveTime is the travel cost)

This property stores an extra cost for the network location.

For example, if you're finding the three closest fire stations from a fire incident using DriveTime as impedance, the Attr_DriveTime attribute can store the amount of time spent at the fire incident. This can be the time it takes for firefighters to hook up their equipment and begin fighting the fire.

Double

Cutoff_[Cost]

(for instance Cutoff_DriveTime, where DriveTime is the travel cost)

This cutoff value indicates the farthest network distance to search for a facility. Any incident farther from the facility than the cutoff value is not searched or included in the results.

A default value for the cost cutoff can be set on the Closest Facility Layer tab for this analysis layer. Values specified in the Cutoff_[Cost] field override that default value. If the default cutoff value is also not set, the closest facility is found, regardless of how far it may be.

Double

Network location fields

  • SourceID
  • SourceOID
  • PosAlong
  • SideOfEdge
  • SnapX
  • SnapY
  • SnapZ
  • DistanceToNetworkInMeters

Together, these properties describe the point on the network where the object is located.

Learn more about locating inputs on a network

  • Long
  • Long
  • Double
  • Long
  • Double
  • Double
  • Double
  • Double

CurbApproach

The CurbApproach field specifies the direction a vehicle may arrive at and depart from the network location. The shortest path between two points can change depending on the direction of travel permitted when arriving at or departing from a location. There are four choices (their coded values are shown in parentheses):

  • Either side of vehicle (0)—The vehicle can approach and depart the point in either direction. U-turns are allowed. Choose this setting if a vehicle can make a U-turn at the location or if it can pull into a driveway or parking lot and turn around.
  • Right side of vehicle (1)—When the vehicle approaches and departs the point, the curb must be on the right side of the vehicle. A U-turn is prohibited.
  • Left side of vehicle (2)—When the vehicle approaches and departs the point, the curb must be on the left side of the vehicle. A U-turn is prohibited.
  • No U-Turn (3)—When the vehicle approaches the point, the curb can be on either side of the vehicle; however, the vehicle must depart without turning around.
Learn more about U-turns and curb approach

For closest facility analyses, the No U-turn (3) value functions the same as Either side of vehicle (0).

Long

Incidents: Input/output fields

Input/Output fieldDescriptionData type

Status

Indicates the status of the point with respect to its location on the network and the outcome of the analysis. The possible values are the following:

  • 0 (OK)—The point was located on the network.
  • 1 (Not Located)—The point was not located on the network and consequently was not included in the analysis.
  • 2 (Network element not located)—The network element identified by the point's network location fields can't be found. This can occur when a network element where the point should be was deleted, and the network location was not recalculated.
  • 3 (Element not traversable)—The network element that the point is located on is not traversable. This can occur when the element is restricted by a restriction attribute.
  • 4 (Invalid Field Values)—Field values fall outside a range or coded-value domain. For example, a negative number exists where positive numbers are required.
  • 5 (Not Reached)—The point can't be reached by the solver. The point may be on a separate, disconnected area of the network from the other inputs, or barriers or restrictions prevent travel to or from the point.
  • 6 (Time window violation)—The point could not be reached within the designated time windows. This status only applies to network analysis types that support time windows.
  • 7 (Not located on closest)—The closest network location to the point is not traversable because of a restriction or barrier, so the point has been located on the closest traversable network feature instead.

Long

Routes feature class

The Routes feature class stores the resulting route, or routes, of the analysis. It is an output-only class; the closest facility analysis layer overwrites or deletes any route features while running the analysis.

Routes: Output fields

Output fieldDescriptionData type

ObjectID

The system-managed ID field.

Object ID

Shape

The geometry field indicating the geographic location of the network analysis object.

Geometry

Name

The name of the closest facility route is based on the names of the associated facility and incident.

The facility name is first if the direction of travel is from the facility to the incident. For example, Facility 5–Incident 3 indicates the route travels from Facility 5 to Incident 3. The incident name is first if the direction of travel is from the incident to the facility.

Text

FacilityID

The unique ID of the facility the route visits.

Long

FacilityRank

The rank of the facility among all facilities found for the associated incident; the closest facility has a rank of 1.

Long

IncidentCurbApproach

Describes the side of the vehicle the incident is on when arriving at or departing from the incident. A value of 1 means the right side of the vehicle; a value of 2 indicates the left side.

Long

FacilityCurbApproach

Describes the side of the vehicle the facility is on when arriving at or departing from the facility. A value of 1 means the right side of the vehicle; a value of 2 indicates the left side.

Long

IncidentID

The unique ID of the incident the route visits.

Long

Total_[Cost]

(for instance Total_Minutes, where Minutes is the travel cost)

The cumulative cost of the route between the facility and the incident. This field is generated for the impedance attribute and any accumulated attributes.

Double

StartTime

The start time of the route, reported as local time at the first stop.

Date

EndTime

The end time of the route, reported as local time at the last stop.

Date

StartTimeUTC

The start time of the route in coordinated universal time (UTC).

Date

EndTimeUTC

The end time of the route in coordinated universal time (UTC).

Date

Closest facility analysis layer properties

The following subsections list parameters you can set on the analysis layer. They are found on the Closest Facility Layer tab, which is available only if your Closest Facility layer or one of its sublayers is selected in the Contents pane.

Analysis

Use the options in this section to estimate the credits and run the analysis.

Analysis section

Run

Once you load input features and set analysis properties, click the Run button to run the analysis. If the analysis uses credits, and the number of credits estimated for the solve exceeds the available credits, an error message appears that blocks the solve or a warning message that allows you to choose whether to proceed with the solve.

The run button may appear different based on the source of the network dataset.

  • Run—The network analysis layer is referencing a local network data source.
  • Run Service—The network analysis layer is referencing a network data source in ArcGIS Online.
  • Run—The network analysis layer is referencing a network data source in an ArcGIS Enterprise portal.

Estimate Credits

You can use the Estimate Credits button to estimate the number of service credits that will be consumed by running the analysis on the selected network analysis layer. When this button is enabled, it indicates that the network analysis layer will consume credits when solved.

Estimate Credits enabled

The Estimate Credits button is enabled when the following occur:

Estimate Credits disabled

The Estimate Credits button is disabled when the following occur:

When you click the Estimate Credits button, a dialog box appears with an estimate of the number of credits that are likely to be consumed solving the current analysis. The credit estimate is based on the number of input locations used in the analysis. The actual credits consumed may change based on the output generated by the Solve operation. Depending on how your organization has set up the credit budgeting and allocation settings, the available credits may not be shown. Also, credit estimation may not always be possible if the network data source is an ArcGIS Enterprise portal with routing services configured from ArcGIS Online.

Learn more about the credit usage by each analysis type

Estimated credit consumption and total credits available
Note:

Depending on the configuration of the ArcGIS Online organization account and the signed-in user, solving the analysis may be blocked or may show a warning if the estimated credits exceed the available credits.

Input Data

Use the options in this section to import the input features to participate in the analysis.

Input Data section

Import Facilities

Use Import Facilities Import Facilities to load features from another data source, such as a point feature layer, into the Facilities feature class.

Import Incidents

Use Import Incidents Import Incidents to load features from another data source, such as a point feature layer, into the Incidents feature class.

Import Barriers

Use the Import Point Barriers Import Point Barriers, Import Line Barriers Import Line Barriers, or Import Polygon Barriers buttons Import Barriers to load features from another data source, such as another feature layer, into one of the barriers feature classes (point barriers, line barriers, or polygon barriers).

Create Features

Use the Create Features button Create Features to open the Create Features pane. Select from the available templates to create features in the current map.

Travel Settings

Use the options from this section to select the travel mode, travel direction, cutoff, and number of facilities.

Travel Settings section

Mode

Use the Mode drop-down list to choose a travel mode, which is a group of settings that together model the movement of pedestrians, cars, trucks, or other travel mode. The choices available in the drop-down list depend on the travel modes that are configured on the network data source that the network analysis layer is referencing.

Direction

Your closest facility analysis can accumulate travel time or other cost in the direction away from or toward the facilities.

  • Away from facilities Away from facilities—The direction of travel is from the facility to the incident.
  • Toward facilities Toward facilities—The direction of travel is from the incident to the facility.

On a network with one-way restrictions and different travel times based on direction of travel, changing the travel direction can produce different results. The direction you should choose depends on the nature of your analysis. For example, to route the closest fire truck (the facility) to the location of a fire (the incident), the Away from facilities option is the most appropriate choice. Alternatively, to identify the closest gas station (facility) to your current location, Toward facilities is a better choice because you need to travel to the facility.

The direction setting affects how Network Analyst interprets the time and date you specify in the Arrive/Depart Date-Time Type, Time of Day, and Date controls.

  • Time Usage: Departure Time indicates departure time.—When the travel direction is set as Away from facilities, the time and date indicate the route starts at the facility.
  • Time Usage: Arrival Time indicates arrival time.—When the travel direction is set as Toward facilities, the time and date indicate the arrival time at the facility.

Cutoff

When calculating the least-cost path from an incident to a facility, the Closest Facility solver stops searching for facilities that lie beyond this impedance cutoff. No facilities beyond this limit are found for that incident. The units you use for the cutoff value are shown next to the Mode drop-down list.

Note:

Cutoff assigns default values to origins that do not have numeric values stored in the Cutoff_[Cost] field.

Accumulate Cost Attributes

The Accumulate Cost Attributes drop-down menu Accumulate Cost Attributes button can be used to configure accumulated cost attributes. The drop-down menu is unavailable if the network data source is a service, the output geometry types do not include lines, or there are no cost attributes. The attributes are grouped by unit domain shown as the group header (for example, Time or Distance). A checked check box indicates that the analysis layer will accumulate the checked attribute during the solve.

Accumulate Cost Attributes drop-down menu

When multiple analysis layers of the same layer type are selected, the check box shows a mixed state if all layers do not share the same checked status for one attribute. In the following image, the WeekendFallbackTravelTime attribute is selected for multiple layers, so it has a check mark:

Check box showing a mixed state

If all selected layers share the checked status for an attribute, the check box shows that state:

Check boxes are checked for the attributes.

Facilities

You can specify the number of facilities to find per incident by entering a value for Facilities or use the controls to specify a value.

Note:

The Facilities value can be overridden on a per-incident basis by specifying an individual value for the TargetFacilityCount property in the incidents sublayer.

Date and Time

Use the options from the Date and Time section to specify the date, time, and day to be used in the analysis.

Date and Time section

Learn more about date and time

Time Usage

You can choose the specified date and time to be either the departure time or arrival time.

Time Usage: Departure Departure—Represents the date and time you want the closest facility routes to start.

Time Usage: Arrival Arrival—Represents the date and time you want the closest facility routes to finish.

Arrive Depart Date-Time Type

The Arrive Depart Date-Time Type drop-down list is available when the cost units are time based. From the drop-down list, choose whether a specific time and date value is given to indicate the time that the route starts or ends. The primary reason for setting a specific time and date is to solve the analysis using dynamic traffic conditions or public transit schedules; however, to use traffic or public transit in the analysis, the network dataset or route service must include traffic data or public transit.

The options in the drop-down list are as follows:

  • Not Using Time—Regardless of whether the network data source includes time-based data, the results are based on static travel times—the travel times on a network edge don't vary throughout the day. The Time of Day and Date text boxes are unavailable.

  • Date & Time—Specify the time as a time of day and calendar date. The Time of Day and Date text boxes are available to provide this information.

  • Day of Week—Specify a time of day and day of the week. The Time of Day and Date text boxes are available to provide this information.

  • Today—Specify a time, and the day is assumed to be the current date. The Time of Day text box is available to provide the time of day, and the Date text box is set to Today and is unavailable so it can't be changed.

  • Now—When you run the analysis, the time and date are set to the current time and date. This is useful if the network dataset is configured with live traffic data, and the routes are distributed to drivers for implementing immediately after running the analysis. The Time of Day and the Date text boxes are unavailable so they can't be changed.

Time of Day

Specify the depart time of the day.

See the Arrive Depart Date-Time Type section to see when this option is enabled.

Date

Specify the depart day of the week by typing one of the following values in the Date text box:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday

See the Arrive Depart Date-Time Type section to see when this option is enabled.

Reference Time Zone

From the Reference Time Zone drop-down list Reference Time Zone button, you can choose the time zone to use in the analysis. The options are as follows:

  • Local Time at Locations
  • UTC (Universal Coordinated Time)

Note:

When routing across multiple time zones, be aware of the following:

  • All incidents must be in the same time zone when the following occur:

    • Specifying a start time and traveling from incident to facility
    • Specifying an end time and traveling from facility to incident

  • All facilities must be in the same time zone when the following occur:

    • Specifying a start time and traveling from facility to incident
    • Specifying an end time and traveling from incident to facility

Output Geometry

Use the options from the drop-down menu to choose how the output will display in the map.

Output Geometry section

Output Geometry Linear Shape Type

The closest facility analysis always solves least-cost paths along the network using the settings you specify. In addition to displaying these true paths along the network on the map, you can also choose to represent the routes on a map using simple straight lines between incidents and facilities or no lines at all.

  • No Lines—No output linear shapes are generated.
  • Straight Lines—Output simplified geometry as straight lines.
  • Along Network—Generate true paths along the network on the map.

Drawing

Use the Symbology button Symbology to access the symbology pane for the active network analysis layer. You can configure the symbology for the sublayers of the active network analysis layer by choosing one of the following options:

  • Single Color—This option is available for all network analysis layer types. All feature sublayers in the active network analysis layer except barriers will use the same single symbol with the specified color. For example, choosing a single color of blue for a Route layer will convert all the Stops and Routes features to the same color of blue.
  • Color Linked—This option is available for Route, Last Mile Delivery, and Vehicle Routing problem layers. It applies a color scheme to the sublayers such that related features are symbolized with the same color. This symbology configuration symbolizes related features with the same color, making it easier to visually distinguish different routes and their associated features in the map. For example, for a Route layer with multiple routes, each route and the stops assigned to that route will be assigned matching colors.

Learn more about network analysis layer symbology

Directions

Use the options from the Directions section to specify whether directions should be generated.

Directions section

Output on Solve

Turn on this option to generate directions upon solve for the current network analysis layer.

Show Directions

When the Output on Solve option is checked, when you click the Show Directions button Directions, the Directions pane appears with turn-by-turn directions for each route in the solution.

Share As

Share the output of the analysis by using the available option of Route Layers.

Share As section

Share as Route Layers

Use the Route Layers button Share As Route Layer to share the results from the analysis as route layers. This button opens the Share as Route Layers geoprocessing tool. After it runs, the results from the analysis are shared as route layer items in the portal.