Skip To Content

ClosestFacility Output Fields

Upon successful execution, the tool returns the best route and driving directions between the incident and the chosen facility and the status indicating if the analysis was successful using the following output parameters:

Output Closest Facilities

This output parameter gives you access to the facilities that were closest to the incidents. It provides the location of the facilities and attribute information from the corresponding input facilities.

The following provides a description of fields that are returned for each route:

Field nameDescriptionData type

Name

A unique identifier for the route. This identifier is automatically generated by the service.

String

ID

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

Text

SourceID

Long

SourceOID

Long

PosAlong

Double

SideOfEdge

Long

AdditionalTime

Double

AdditionalDistance

Double

AdditionalCost

Double

Cutoff

Double

CurbApproach

Short

ORIG_FID

Long

Output Routes

Use this parameter to access the resulting route or routes between the facilities and the incidents.

The following table lists the fields that are returned for each route:

Field nameDescriptionData type

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 Facility to Incident is specified as the travel_direction parameter. For example, Facility 5—Incident 3 indicates the route travels from Facility 5 to Incident 3.

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

String

FacilityID

The unique ID of the facility the route visits. If the ID attribute is included when specifying the facilities parameter, the FacilityID value is the same as the value for the ID attribute. Otherwise, FacilityID contains an automatically generated identifier.

String

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.

Long

FacilityRank

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

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

Long

IncidentID

The unique ID of the incident the route visits. If the ID attribute is included when specifying the incidents parameter, the IncidentID value is same as the value for the ID attribute. Otherwise, IncidentID contains an automatically generated identifier.

String

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.

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

Total_Minutes

The cumulative travel time in minutes of the route between the facility and the incident.

Double

Total_Miles

The cumulative travel distance in miles of the route between the facility and the incident.

Double

Total_Kilometers

The cumulative travel distance in kilometers of the route between the facility and the incident.

Double

Output Directions

Use this parameter to access the turn-by-turn driving directions for each resulting route between the facilities and the incidents.

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

Field nameDescriptionData type

RouteName

The name of the route to which the driving action applies. This value is the same as the Name attribute from output_routes parameter.

String

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.

Date

Type

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

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

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

Maneuver types

ValueDescription

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

ValueDescription

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

Short

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.

Short

Text

A text description of the driving direction.

String

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.

Double

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 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.

Double

Output Incidents

Field

Description

Data Type

Name

String

TargetFacilityCount

Integer

SourceID

Long

SourceOID

Long

PosAlong

Long

SideOfEdge

Long

CurbApproach

Long

Status

Long

AdditonalTime

Double

AdditionalDistance

Double

AdditionalCost

Double

Cutoff

Double

IncidentOID

Double

Output Facilities

Field

Description

Data Type

Name

Integer

SourceID

Long

SourceOID

Long

PosAlong

Long

SideOfEdge

Long

CurbApproach

Long

Status

Long

AdditonalTime

Double

AdditionalDistance

Double

AdditionalCost

Double

Cutoff

Double

IncidentOID

Double