Points To Track Segments (AllSource)

Summary

Converts time-enabled sequences of input point data, such as GPS points, to a series of output paths.

Usage

  • If the Input Features parameter values are in a projected coordinate system, the Output Feature Class parameter value will use the same coordinate system. If the Input Features parameter values are in a geographic coordinate system, the Output Feature Class parameter value will use World Azimuthal Equidistant.

  • If the Input Features parameter values have points with the same coordinates, a 1-centimeter offset is added to the second y-coordinate when each output line is created. This is because the geometry model does not allow duplicate vertices in a single polyline.

  • When the Input Features points are in projected Web Mercator, there may be discrepancies between the values in the Shape Length and distance_m fields because the distance_m field values are calculated using a geodesic length and are considered more accurate.

  • The following fields will be added to the Output Feature Class parameter value:

    Field nameField aliasDescription
    d_startStart Date

    Starting date and time

    d_start_sStart Date (string)

    Starting date and time as string or text

    d_endEnd Date

    Ending date and time

    d_end_sEnd Date (string)

    Ending date and time as string or text

    distance_mDistance (meters)

    Distance in meters

    dt_secTime Delta (seconds)

    Time difference in seconds

    dt_minTime Delta (minutes)

    Time difference in minutes

    speed_mpsSpeed (meters per second)

    Optional. Speed in meters per second

    speed_mphSpeed (miles per hour)

    Optional. Speed in miles per hour

    speed_kphSpeed (kilometers per hour)

    Optional. Speed in kilometers per hour

    speed_kntSpeed (knots)

    Optional. Speed in knots

    oid_startStart ObjectID

    Object ID of starting point from Input Features

    oid_endEnd ObjectID

    Object ID of ending point from Input Features

    group_idGroup Identification

    Optional. Group Field values from the Input Features parameter

  • The following fields will be added to the Output Sequence Points parameter value:

    Field nameField aliasDescription
    sequenceSequence Number

    Sequence number of point in the track

    dateDate

    Datetime field from the Input Features parameter

    date_strDate (string)

    Datetime field as string

    oid_origOriginal ObjectID

    Object ID of original feature from the Input Features parameter

    group_idGroup Identification

    Optional. Group Field values from the Input Features parameter

    An output .lyrx file (symbology and layer settings) will be created for the Output Feature Class and Output Sequence Points parameters. These files will be created in the nearest folder workspace that contains the output features.

  • If the Include Velocity parameter is checked and the Error On Duplicate Timestamps parameter is not checked, any duplicate time stamps the output track velocity measures will be inf in which inf is infinity, regardless of the distance between the points.

  • Null values in the Group Field parameter value will not be processed. Null values cannot be sorted and grouped as part of the input point processing, so those rows will be skipped. To prevent this issue, use data engineering or the Calculate Field tool to convert null values to valid values before using this tool.

Parameters

LabelExplanationData Type
Input Features

The point features as point positions along the tracks to be created.

Feature Layer
Date Field

The date field that will be used to order the Input Features points.

Field
Output Feature Class

The output track line features.

Feature Class
Group Field
(Optional)

A field from the Input Features parameter that will be used to group the input points. Each unique group will create a separate track.

Field
Include Velocity Fields
(Optional)

Specifies whether velocity fields (speed_mps, speed_mph, speed_kph, and speed_knt) will be included in the Output Feature Class parameter value.

  • Checked—Output velocity fields will be included in the output. This is the default.
  • Unchecked—Output velocity fields will not be included in the output.
Boolean
Output Sequence Points
(Optional)

The output point features. The output will include a SEQUENCE field that contains the order that will be used for the path created in the Output Feature Class parameter.

Feature Class
Error On Duplicate Timestamps
(Optional)

Specifies whether duplicate time stamps in the Date Field parameter value or in each group in the Group Field parameter value will be accepted or cause the tool to fail.

  • Checked—Duplicate time stamps will cause the tool to fail. This is the default.
  • Unchecked—Duplicate time stamps will be accepted. The sequence of the duplicate time stamps is based on the ObjectID value.
Boolean
Keep Input Fields
(Optional)

Specifies whether fields will be transferred from the Input Features parameter value to the Output Sequence Points parameter value.

  • Checked—Fields will be transferred from the Input Features parameter value to the Output Sequence Points parameter value.
  • Unchecked—Fields will not be transferred from the Input Features parameter value to the Output Sequence Points parameter value. This is the default.
Boolean

arcpy.intelligence.PointsToTrackSegments(in_features, date_field, out_feature_class, {group_field}, {include_velocity}, {out_point_feature_class}, {error_on_duplicate_timestamps}, {keep_input_fields})
NameExplanationData Type
in_features

The point features as point positions along the tracks to be created.

Feature Layer
date_field

The date field that will be used to order the in_features points.

Field
out_feature_class

The output track line features.

Feature Class
group_field
(Optional)

A field from the in_features parameter that will be used to group the input points. Each unique group will create a separate track.

Field
include_velocity
(Optional)

Specifies whether output velocity fields (speed_mps, speed_mph, speed_kph, and speed_knt) will be included in the out_feature_class parameter value.

  • INCLUDE_VELOCITYOutput velocity fields will be included in the output. This is the default.
  • EXCLUDE_VELOCITYOutput velocity fields will not be included in the output.
Boolean
out_point_feature_class
(Optional)

The output point features. The output will include a SEQUENCE field that contains the order that will be used for the path created in the out_feature_class parameter.

Feature Class
error_on_duplicate_timestamps
(Optional)

Specifies whether duplicate time stamps in the date_field parameter value or in each group in the group_field parameter value will be accepted or cause the tool to fail.

  • ERROR_DUPLICATE_TIMESTAMPSDuplicate time stamps will cause the tool to fail. This is the default.
  • ALLOW_DUPLICATE_TIMESTAMPSDuplicate time stamps will be accepted. The sequence of the duplicate time stamps is based on the ObjectID value.
Boolean
keep_input_fields
(Optional)

Specifies whether fields will be transferred from the in_features parameter value to the out_point_feature_class parameter value.

  • KEEP_INPUT_FIELDSFields will be transferred from the in_features parameter value to the out_point_feature_class parameter value.
  • DISCARD_INPUT_FIELDSFields will not be transferred from the in_features parameter value to the out_point_feature_class parameter value. This is the default.
Boolean

Code sample

PointsToTrackSegments example 1 (Python window)

The following Python window script demonstrates how to use the PointsToTrackSegments function in immediate mode:

import arcpy

arcpy.intelligence.PointsToTrackSegments("C:/data/mtracks.gdb/source_pts", 
                                         "DateTime", 
                                         "C:/data/mtracks.gdb/tracklines", 
                                         "Name",
                                         "INCLUDE_VELOCITY",
                                         "C:/data/mtracks.gdb/seqpoints")
PointsToTrackSegments example 2 (stand-alone script)

The following Python script demonstrates how to use the PointsToTrackSegments function in a stand-alone script:

# Name: PointsToTrackSegments_Example2.py
# Description: Convert points to track segments.

# Import system modules
import arcpy 

# Set local variables
in_features = "C:/data/mtracks.gdb/source_pts"
date_time = "DateTime"
out_feature_class = "C:/data/mtracks.gdb/tracklines"
group_field = "Name" 
out_points = "C:/data/mtracks.gdb/seqpoints"

# Run PointsToTrackSegments
arcpy.intelligence.PointsToTrackSegments(in_features, date_time, 
                                         out_feature_class, group_field,
                                         "INCLUDE_VELOCITY", out_points)

Environments

This tool does not use any geoprocessing environments.