The Calculate Journeys tool analyzes point-based observations of moving entities and generates either journeys or dwell locations based upon user-defined distance and time span tolerances.

## Examples

- A shipping company wants to better understand ship movement in order to identify what routes ships have taken, the distance traveled in each journey, and the mean speed for that journey. Calculate Journeys can be used to generate polyline journeys containing this information as well as additional attributes regarding start and end dwells.
- A transportation department is monitoring vehicle movement in order to identify dwell locations. The Calculate Journeys tool can be used to identify dwell locations where vehicles have not exceeded a certain speed threshold.

## Usage notes

- Track ID and Start Time key fields must be identified on the input layer in order to use this tool.
- When using the Calculate Journeys tool, you must choose whether to generate Journeys or Dwell Locations. If you would like to generate both, configure two instances of the Calculate Journeys tool with two separate outputs.
- If you choose to generate Journeys, the output will be a polyline layer. If you choose to generate Dwell Locations, the output will be a point layer.
- The values in the Distance Tolerance andTime Span Tolerance parameters are combined to form a speed threshold. This speed threshold is utilized to identify dwell locations.
- When generating journeys, you must choose whether or not to include gaps. If selected, gaps will be created as a type of journey in the output.
- Additional statistics can be calculated using the Summary Fields parameter. The summary fields statistics available depend on the field type you are summarizing. A string attribute field can utilize the statistics ANY, COUNT, and COUNT DISTINCT. A numeric attribute field can use the statistics ANY, COUNT, COUNT DISTINCT, SUM, SUM OF SQUARES, MIN, MAX, RANGE, VARIANCE, and STANDARD DEVIATION. A date attribute field can utilize the statistics ANY, COUNT, MIN, MAX, and RANGE.

## Parameters

Parameter | Description | Data Type |
---|---|---|

Input Layer | The point features for which either journeys or dwell locations will be calculated. | Features |

Distance Tolerance | The distance tolerance value that will be used to determine dwell locations. The values in the Distance Tolerance and Time Span Tolerance parameters are combined to form a speed threshold. | String |

Time Span Tolerance | The time span tolerance value that will be used to determine dwell locations. The values in the Distance Tolerance and Time Span Tolerance parameters are combined to form a speed threshold. | String |

Output | Whether to return the Journeys (line segments) or the Dwell Locations (points) from the journey analysis. | String |

TRACK_ID Fields | You must select the field(s) to uniquely identify features that will be processed. This parameter will be auto-populated if a TRACK_ID key field has been set on the input layer. | String |

Method | Whether the distance calculation method should be Geodesic or Planar (Euclidean). | String |

Include Gaps | Whether or not to include gaps as a type of journey in the output. This parameter only applies when an output type of Journeys (line segments) is chosen. | Boolean |

Gap Duration | The tolerance for determination of gaps between observations. Sequential observations greater than this time span apart will be considered a gap, and the previous journey will terminate at the start of the gap. This parameter only applies when an output type of Journeys (line segments) is chosen. | String |

Summary Fields | The statistics that will be calculated for specified fields. Different statistics are available depending if the specified field is a string, numeric, or date field. - ANY - This is a sample string from a field of type string.
- COUNT - Calculates the number of nonnull values. It can be used on numeric fields or strings. The count of [null, 0, 2] is 2.
- COUNT DISTINCT - Calculates the number of distinct, nonnull values. It can be used on numeric fields or strings. The count distinct result of [null, 4, 3, 4] is 2.
- SUM - The sum of numeric values in a field. The sum of [null, 1, 3] is 4.
- SUM OF SQUARES - The sum, over all observations, of the squared differences of each observation from the overall mean. The sum of squares of [null, 2.2, 3.1, 4.7] is 3.206.
- MIN - The minimum value of a numeric field. The minimum of [0, 2, null] is 0.
- MAX - The maximum value of a numeric field. The maximum value of [0, 2, null] is 2.
- MEAN - The mean of numeric values. The mean of [0,2, null] is 1.
- RANGE - The range of a numeric field. This is calculated as the minimum value subtracted from the maximum value. The range of [0, null, 1] is 1. The range of [null, 4] is 0.
- VARIANCE - The variance of a numeric field in a track. The variance of [1] is null. The variance of [null, 1,1,1] is 1.
- STANDARD DEVIATION - The standard deviation of a numeric field. The standard deviation of [1] is null. The standard deviation of [null, 1,1,1] is 1.
| String |

## Output layer

The output layer will contain the TRACK_ID field of the input observations as well as a variety of attributes. The attributes present on the output depend on the value chosen for the Outputparameter (Journeys or Dwell Locations).

#### Journeys output layer attributes:

Field Name | Description | Field Type |
---|---|---|

TRACK_ID | The TRACK_ID key field used for processing. | any |

JourneyId | A sequentially numbered ID value for the journey. The first journey for a given track is 1, the second journey is 2, and so forth. These IDs are used as the basis for the PreviousJourneyId and NextJourneyId attributes. | Int32 |

JourneyType | Whether the line segment is a journey or a gap. | String |

JourneyStartTime | The start time of the journey. If the journey begins at a dwell location, the start time is the time of the latest feature in the dwell location. | Date |

JourneyEndTime | The end time of the journey. If the journey ends at a dwell location, the start time is the time of the earliest feature in the dwell location. | Date |

JourneyDuration | The amount of time in milliseconds between the start and end time of the journey. | Float64 |

JourneyDistanceTraveled | he distance traveled along the journey. If the journey begins at a dwell location, the XY of the dwell centroid is used for the journey's first point, and likewise for the end location if the journey ends in a dwell. | Float64 |

JourneyMeanSpeed | The mean speed of the journey (JourneyDistanceTraveled / JourneyDuration). | Float64 |

JourneyObservationCount | The number of observations that make up the journey. | Float64 |

PreviousJourneyId | The id of the journey immediately before the journey. | Float64 |

NextJourneyId | The id of the journey immediately after the journey. | Int32 |

StartDwellX | The x coordinate of the centroid of the observations that make up the dwell location at the beginning of the journey. This attribute is null if the journey began based on a gap. | Float64 |

StartDwellY | The y coordinate of the centroid of the observations that make up the dwell location at the beginning of the journey. This attribute is null if the journey began based on a gap. | Float64 |

StartDwellStartTime | The timestamp of the earliest point in the group of points that define the dwell. | Date |

StartDwellEndTime | The timestamp of the latest point in the group of points that define the dwell. | Date |

StartDwellDuration | The duration (in milliseconds) of the dwell at the beginning of the journey. | Float64 |

StartDwellMeanDistance | The mean distance, of any point participating in the dwell, from the centroid of the dwell. | Float64 |

StartDwellObservationCount | The number of observations that make up the dwell. | Float64 |

EndDwellX | The x coordinate of the centroid of the observations that make up the dwell location at the end of the journey. This attribute is null if the journey ends based on a gap. | Float64 |

EndDwellY | The y coordinate of the centroid of the observations that make up the dwell location at the end of the journey. This attribute is null if the journey ends based on a gap. | Float64 |

EndDwellStartTime | The timestamp of the earliest point in the group of points that define the dwell. | Date |

EndDwellEndTime | The timestamp of the latest point in the group of points that define the dwell. | Date |

EndDwellDuration | The duration (in milliseconds) of the dwell at the end of the journey. | Float64 |

EndDwellMeanDistance | The mean distance, of any point participating in the dwell, from the centroid of the dwell. | Float64 |

EndDwellObservationCount | The number of observations that make up the dwell. | Float64 |

#### Dwell Locations output layer attributes:

Field Name | Description | Field Type |
---|---|---|

TRACK_ID | The TRACK_ID key field used for processing. | any |

DwellObservationCount | The number of observations that make up the dwell. | Float64 |

DwellDuration | The duration (in milliseconds) of the dwell. | Float64 |

DwellStartTime | The timestamp of the earliest point in the group of points that define the dwell. | Date |

DwellEndTime | The timestamp of the latest point in the group of points that define the dwell. | Date |

DwellMeanDistance | The mean distance, of any point participating in the dwell, from the centroid of the dwell. | Float64 |

DwellX | The x coordinate of the centroid of the observations that make up the dwell location. | Float64 |

DwellY | The y coordinate of the centroid of the observations that make up the dwell location. | Float64 |