Output from Find Closest Facilities

Upon successful execution, the service returns the best route and travel directions between the incident and the chosen facility and the status indicating whether the analysis was successful using the following output parameters:

output_facilities and output_closest_facilities

This provides access to the output facilities from a closest facility analysis.

The output_closest_facilities parameter includes only those facilities from the set of input facilities that were closest to at least one incident. Conversely, the output_facilities data type includes all the facilities from the analysis including the facilities that cannot be reached from any of the incidents. You can use the Status field from the output_facilities data type to determine why a facility was not used in the analysis.

The following table lists the fields that are returned for output facilities:

Field nameDescription

Name

The name of the facility. The values for this field are copied from the Name field on the input facilities.

SourceID

The numeric identifier of the network dataset source feature class on which the input point is located.

SourceOID

The ObjectID of the feature in the source on which the input point is located.

PosAlong

The position along the digitized direction of the source line feature. This value is stored as a ratio. This field is null if the network location references a junction.

SideOfEdge

The side of the edge in relation to the digitized direction of the line feature. This field is limited to a domain of two values: Right Side (1) and Left Side (2).

CurbApproach

The direction a vehicle may arrive at and depart from the facility. The values for this field are copied from the CurbApproach field on the input facilities.

Status

Indicates how the facility was evaluated in the analysis. The possible values are the following:

  • 0 (OK)—The facility was successfully located on the transportation network and analyzed.
  • 1 (Not Located)—The facility was not included in the analysis since a traversable road was not found within the maximum search distance from the facility.
  • 3 (Elements not traversable)—The network element that the facility is on is not traversable. This can occur when the network 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 may exist where positive numbers are required.
  • 5 (Not Reached)—The facility couldn't be reached due to constraints; for example, a curb approach is set so that a vehicle must travel in the wrong direction on a one-way street to reach the facility.
  • 7 (Not located on closest)—The closest network location to the facility is not traversable because of a restriction or barrier, so the facility has been located on the closest traversable network feature instead.

SnapX

The x-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset.

SnapY

The y-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset.

SnapZ

The z-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset. The SnapZ field is 0 if the network is two dimensional.

DistanceToNetworkInMeters

The distance in meters between the point's geographic location and the position where it was located on the network.

AdditionalTime

The amount of time added to the total route time when this facility is visited. The values for this field are copied from the AdditionalTime field on the input facilities.

AdditionalDistance

The amount of distance added to the total route distance when this facility is visited. The values for this field are copied from the AdditionalDistance field on the input facilities.

AdditionalCost

The cost added to the total route cost when this facility is visited. The values for this field are copied from the AdditionalCost field on the input facilities. This field is included only when the travel mode used for the analysis has an impedance attribute that is neither time based nor distance based.

Cutoff

The impedance value at which the analysis stopped searching for the facilities from a given incident. The values for this field are copied from the Cutoff field on the input facilities.

ID

A unique identifier for the facility. The values for this field are copied from the ID field on the input facilities.

ORIG_FID

FacilityOID

The ObjectID value of the input facility. This field is often used to join information from the input facilities.

The ClosestFacilities output includes the ORIG_FID field, and the Facilities output includes the FacilityOID field.

Bearing

The values for this field are copied from the Bearing field on the input facilities.

BearingTol

The values for this field are copied from the BearingTol field on the input facilities.

NavLatency

The values for this field are copied from the NavLatency field on the input facilities.

output_routes

This provides access to the resulting route or routes between the facilities and the incidents.

The route_shape and route_line_simplification_tolerance parameters influence the shape of the output routes.

Field nameDescription

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 value for the travel_direction parameter is set to Facility to Incident. For example, Facility 5 - Incident 3 indicates that the route travels from Facility 5 to Incident 3.

If Incident to Facility is specified as the value for the travel_direction parameter, the incident name is first, for example, Incident 3 — Facility 5.

FacilityRank

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

FacilityID

The unique ID of the facility the route visits. The values for this field are copied from the ID field on the input facilities.

FacilityOID

The ObjectID value of the input facility used to generate the route. This field is often used to join information from facilities to routes.

IncidentID

The unique ID of the incident the route visits. The values for this field are copied from the ID field on input incidents .

IncidentOID

The ObjectID value of the input incident used to generate the route. This field is often used to join information from incidents to routes.

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 vehicle; a value of 2 indicates the left side.

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.

StartTime

The start time of the route, reported in the time zone in which the first stop is located.

EndTime

The end time of the route, reported in the time zone in which the last stop is located.

StartTimeUTC

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

EndTimeUTC

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

Total_Minutes

The cumulative travel time in minutes of the route between the facility and the incident. This includes any AdditionalTime for the visited facility and incident if specified.

Note:

An additional field, Total_[TimeUnits], is included if the measurement_units parameter is time based and its value is not Minutes. The field values are in the units specified by the measurement_units parameter.

Note:

Additional fields, Total_[AccumulateAttributeName]_[TimeUnits], are included for each time-based cost attribute that is accumulated during the analysis.

Total_Miles

The cumulative travel distance in miles of the route between the facility and the incident. This includes any AdditionalDistance for the visited facility and incident if specified.

Note:

An additional field, Total_[DistanceUnits], is included if the measurement_units parameter is distance based and its value is not Miles or Kilometers. The field values are in the units specified by the measurement_units parameter.

Note:

Additional fields, Total_[AccumulateAttributeName]_[DistanceUnits], are included for each distance-based cost attribute that is accumulated during the analysis.

Total_Kilometers

The cumulative travel distance in kilometers of the route between the facility and the incident. This includes any AdditionalDistance for the visited facility and incident if specified.

Note:

An additional field, Total_[DistanceUnits], is included if the measurement_units parameter is distance based and its value is not Miles or Kilometers. The field values are in the units specified by the measurement_units parameter.

Note:

Additional fields, Total_[AccumulateAttributeName]_[DistanceUnits], are included for each distance-based cost attribute that is accumulated during the analysis.

Total_Other

The cumulative travel cost in unknown units of the route between the facility and the incident. This includes any AdditionalCost for the visited facility and incident if specified.

This field is included only when the travel mode used for the analysis has an impedance attribute that is neither time based nor distance based.

Note:

Additional fields Total_[AccumulateAttributeName]_Other are included for each cost attribute that is neither time based nor distance based and accumulated during the analysis.

output_incidents

This provides access to the locations used as starting or ending points in a closest facility analysis.

The following table lists the fields that are returned for output incidents:

FieldDescription

Name

The name of the incident. The values for this field are copied from the Name field on input incidents.

TargetFacilityCount

The number of facilities that need to be found for the given incident. The values for this field are copied from the TargetFacilityCount field on the input incident.

SourceID

The numeric identifier of the network dataset source feature class on which the input point is located.

SourceOID

The ObjectID of the feature in the source on which the input point is located.

PosAlong

The position along the digitized direction of the source line feature. This value is stored as a ratio. This field is null if the network location references a junction.

SideOfEdge

The side of the edge in relation to the digitized direction of the line feature. This field is limited to a domain of two values: Right Side (1) and Left Side (2).

CurbApproach

The direction a vehicle may arrive at and depart from the incident. The values for this field are copied from the CurbApproach field on the input incident.

Status

Indicates how the incident was evaluated in the analysis. The possible values are the following:

  • 0 (OK)—The incident was successfully located on the transportation network and analyzed.
  • 1 (Not Located)—The incident was not included in the analysis since a traversable road was not found within the maximum search distance from the incident.
  • 3 (Element not traversable)—The network element that the incident is 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 may exist where positive numbers are required.
  • 5 (Not Reached)—The incident couldn't be reached due to constraints; for example, a curb approach is set so that a vehicle must travel in the wrong direction on a one-way street to reach the incident.
  • 7 (Not located on closest)—The closest network location to the incident is not traversable because of a restriction or barrier, so the incident has been located on the closest traversable network feature instead.

SnapX

The x-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset.

SnapY

The y-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset.

SnapZ

The z-coordinate of the position on the network dataset where the point was located, in the coordinate system of the network dataset. The SnapZ field is 0 if the network is two dimensional.

DistanceToNetworkInMeters

The distance in meters between the point's geographic location and the position where it was located on the network.

AdditonalTime

The amount of time added to the total route time when this incident is visited. The values for this field are copied from the AdditionalTime field on the input incident.

AdditionalDistance

The amount of distance added to the total route distance when this incident is visited. The values for this field are copied from the AdditionalDistance field on the input incident.

AdditionalCost

The cost added to the total route cost when this incident is visited. The values for this field are copied from the AdditionalCost field on the input incident. This field is included only when the travel mode used for the analysis has an impedance attribute that is neither time based nor distance based.

Cutoff

The impedance value at which the analysis stopped searching for the incidents from a given facility. The values for this field are copied from the Cutoff field on the input incident.

IncidentOID

The ObjectID value of the input incident. This field is often used to join information from the input facilities.

Bearing

The values for this field are copied from the Bearing field on the input facilities.

BearingTol

The values for this field are copied from the BearingTol field on the input facilities.

NavLatency

The values for this field are copied from the NavLatency field on the input facilities.

output_directions

This provides access to the turn-by-turn directions for each resulting route.

The shape for the directions feature is determined from the underlying streets included in the route.

The Directions Language, Directions Distance Units, and Directions Style Name parameters influence the travel directions. The parameter returns empty features if the Populate Directions parameter is False.

The following table lists the fields that are returned for output directions:

FieldDescription

RouteName

The name of the route to which the driving action applies. This value is the same as the Name field of the output routes.

ArriveTime

The time of day to initiate the given driving action. If the route spans multiple days, the date and time of day are displayed.

Type

The type of maneuver that the directions feature represents or the type of the directions text. To determine whether Type refers to a maneuver type or a directions string type, check the value of the SubItemType field.

Type can be used, for example, to assign an icon for direction text based on the maneuver type, or it can use a formatting style based on the directions string type when displaying the driving directions in your application.

The Type value is an integer from the Maneuver Types or Directions String Types lists below.

Maneuver Types

  • 0: Unknown
  • 1: Arrive at Stop
  • 2: Go straight
  • 3: Bear left
  • 4: Bear right
  • 5: Turn left
  • 6: Turn right
  • 7: Make sharp left
  • 8: Make sharp right
  • 9: Make U-turn
  • 10: Take ferry
  • 11: Take roundabout
  • 12: Merge to highway
  • 13: Exit highway
  • 14: Go on another highway
  • 15: At fork keep center
  • 16: At fork keep left
  • 17: At fork keep right
  • 18: Depart stop
  • 19: Trip planning item
  • 20: End of ferry
  • 21: Ramp right
  • 22: Ramp left
  • 23: Turn left and immediately turn right
  • 24: Turn right and immediately turn left
  • 25: Turn right and immediately turn right
  • 26: Turn left and immediately turn left

Directions String Types

  • 0: General directions string type
  • 1: Depart directions string type
  • 2: Arrive directions string type
  • 3: Length directions string type
  • 4: Time directions string type
  • 5: Time summary directions string type
  • 6: Time Window directions string type
  • 7: Violation Time directions string type
  • 8: Wait Time directions string type
  • 9: Service Time directions string type
  • 10: Estimated Arrival Time directions string type
  • 11: Cumulative Length directions string type
  • 12: Street name directions string type
  • 13: Alternate street name directions string type
  • 14: Sign branch information directions string type
  • 15: Sign toward information directions string type
  • 16: Cross street name directions string type
  • 17: Sign exit number directions string type

SubItemType

Specifies whether the Type field refers to an integer from the Directions String Types table or the Maneuver Types table.

  • If the SubItemType value is 1, the Type refers to the values from the Maneuver Types table.
  • If the SubItemType value is 2, the Type refers to the values from the Directions String Types table.

Text

A text description of the travel directions.

ElaspsedTime

The time elapsed in minutes from when the current driving direction starts until the next one starts, or until the route ends for the last driving direction.

DriveDistance

The distance from where the current driving direction occurs to where the next one occurs, or to where the route ends for the last driving direction.

The value is in the units specified by the Directions_Distance_Units parameter.

This value is zero for driving directions that occur at the same location where the next one begins. For example, the DriveDistance is 0 for the directions text at the start of the route.

output_direction_points

Specifies the output turn-by-turn directions for the routes calculated in the analysis, represented as point locations along the routes where specific directions events or maneuvers occur.

Field nameDescription

RouteID

The ObjectID of the output output_routes feature with which this direction point is associated.

Sequence

The sequence of the direction points for the route, starting with 1.

DirectionPointType

The type of directions event or maneuver described by the point, designated by one of the values below.

  • Header (1)
  • Arrive (50)
  • Depart (51)
  • Straight (52)
  • On Ferry (100)
  • Off Ferry (101)
  • Central Fork (102)
  • Roundabout (103)
  • U-Turn (104)
  • Door (150)
  • Stairs (151)
  • Elevator (152)
  • Escalator (153)
  • Pedestrian Ramp (154)
  • Left Fork (200)
  • Left Ramp (201)
  • Clockwise Roundabout (202)
  • Left-handed U-turn (203)
  • Bear left (204)
  • Left Turn (205)
  • Sharp Left (206)
  • Left Turn and immediate Left Turn (207)
  • Left Turn and immediate Right Turn (208)
  • Right Fork (300)
  • Right Ramp (301)
  • Counter-Clockwise Roundabout (302)
  • Right-handed U-turn (303)
  • Bear right (304)
  • Right Turn (305)
  • Sharp Right (306)
  • Right Turn and immediate Left Turn (307)
  • Right Turn and immediate Right Turn (308)
  • Up Elevator (400)
  • Up Escalator (401)
  • Up Stairs (402)
  • Down Elevator (500)
  • Down Escalator (501)
  • Down stairs (502)
  • General Event (1000)
  • Landmark (1001)
  • Time Zone Change (1002)
  • Traffic Event (1003)
  • Scaled Cost Barrier Event (1004)
  • Boundary Crossing (1005)
  • Restriction Violation (1006)

StopID

The ObjectID of the stop with which this direction point is associated, if any. If the point does not represent a visit to a stop, the value is null.

DisplayText

The directions text to display in the consuming application.

ArrivalTime

The time when the directions event happens in coordinated universal time (UTC).

ArrivalUTCOffset

The difference in minutes between the local time at the maneuver location and UTC time shown in the ArrivalTime field, in minutes.

Name

The name of the directions point.

ExitName

The highway exit name that appears in the directions instruction.

AlternateName

Alternate source name that appears in the directions instruction.

IntersectingName

The name of the intersecting or cross street that appears in the directions instruction.

BranchName

The signpost branch name that appears in the directions instruction.

TowardName

The signpost toward destination name that appears in the directions instruction.

Level

The building level at which this directions event occurs. This value corresponds to the Level property defined in the network dataset used for the analysis.

ShortVoiceInstruction

Short text to use as voice guidance text in the consuming application.

VoiceInstruction

Fill text, including expanded abbreviations and plurals, to use as voice guidance text in the consuming application.

Azimuth

The bearing in degrees of the vehicle departing this point. Zero indicates north.

output_direction_lines

Specifies the output route lines calculated in the analysis sliced to represent each route segment between DirectionPoints event or maneuver locations.

Field nameDescription

DirectionPointID

The ObjectID of the feature in the output_direction_points table with which this line is associated.

RouteID

The ObjectID of the output output_routes feature with which this direction line is associated.

DirectionLineType

The type of directions situation described by this line, designated by one of the values below.

  • Unknown (0)
  • Segment (1)
  • Maneuver Segment (2)
  • Restriction violation (3)
  • Scaled Cost Barrier (4)
  • Heavy Traffic (5)
  • Slow Traffic (6)
  • Moderate Traffic (7)

Meters

The length of the line segment measured in meters.

Minutes

The travel time along the line segment in minutes.

FromLevel

The building level at which this directions event begins. This value corresponds to the Level property defined in the network dataset used for the analysis. Learn more about the directions configuration of a network dataset

ToLevel

The building level at which this directions event ends. This value corresponds to the Level property defined in the network dataset used for the analysis.

solve_succeeded

Use this parameter to determine if the analysis was successful.

output_route_data

Use this parameter to access a .zip file that contains a file geodatabase containing the inputs and outputs of the analysis in a format that can be used to share route layers with ArcGIS Online or Portal for ArcGIS. The parameter value is populated only when the Save Route Data parameter is set to True.

The file is downloaded to a temporary directory on your machine. In ArcGIS Pro, the location of the downloaded file can be determined by viewing the Output Route Data parameter value in the entry corresponding to the tool execution in the geoprocessing history of your project. In ArcMap, the location of the file can be determined by accessing the Copy Location option in the shortcut menu on the Output Route Data parameter in the entry corresponding to the tool execution in the Geoprocessing Results window.

output_result_file

Use this parameter to access the results from the analysis as a .zip file containing one or more files for each output. The format of the individual file is specified by the Output Format parameter. The parameter value is not populated when the Output Format parameter is set to Feature Set.

When a file-based output format—such as JSON File or GeoJSON File—is specified, no outputs are added to the display, since the application (such as ArcMap or ArcGIS Pro) does not draw the contents of the result file. Instead, the result file is downloaded to a temporary directory on your machine. In ArcGIS Pro, the location of the downloaded file can be determined by viewing the Output Result File parameter value in the entry corresponding to the tool execution in the geoprocessing history of your project. In ArcMap, the location of the file can be determined by accessing the Copy Location option in the shortcut menu on the Output Result File parameter in the entry corresponding to the tool execution in the Geoprocessing Results window.

output_network_analysis_layer

Use this parameter to access the network analysis layer file that stores the analysis settings and the inputs and outputs used for the analysis. The parameter value is populated only when the Save Output Network Analysis Layer parameter is set to True.

The file is downloaded to a temporary directory on your machine. In ArcGIS Pro, the location of the downloaded file can be determined by viewing the Output Network Analysis Layer parameter value in the entry corresponding to the tool execution in the geoprocessing history of your project. In ArcMap, the location of the file can be determined by accessing the Copy Location option in the shortcut menu on the Output Network Analysis Layer parameter in the entry corresponding to the tool execution in the Geoprocessing Results window.

Note:

You cannot work directly with this file even when you open the file in an ArcGIS Desktop application such as ArcMap since its data source will not be valid. The file is meant to be sent to Esri Technical Support to diagnose the quality of results returned from the tool.