Label | Explanation | Data Type |
Input Features
| 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.
| 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 |
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 is in a projected coordinate system, the Output Feature Class parameter will use the same coordinate system. If the Input Features parameter is in a geographic coordinate system, the Output Feature Class parameter 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 for duplicate vertices in a single polyline.
When 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 are added to the Output Feature Class parameter:
Field name Field alias Description d_start Start Date Starting date and time
d_start_s Start Date (string) Starting date and time as string/text
d_end End Date Ending date and time
d_end_s End Date (string) Ending date and time as string/text
distance_m Distance (meters) Distance in meters
dt_sec Time Delta (seconds) Time difference in seconds
dt_min Time Delta (minutes) Time difference in minutes
speed_mps Speed (meters per second) Optional. Speed in meters per second
speed_mph Speed (miles per hour) Optional. Speed in miles per hour
speed_kph Speed (kilometers per hour) Optional. Speed in kilometers per hour
speed_knt Speed (knots) Optional. Speed in knots
oid_start Start ObjectID Object ID of starting point from Input Features
oid_end End ObjectID Object ID of ending point from Input Features
group_id Group Identification Optional. Group Field values from the Input Features parameter
The following fields are added to the Output Sequence Points parameter:
Field name Field alias Description sequence Sequence Number Sequence number of point in the track
date Date Datetime field from the Input Features parameter
date_str Date (string) Datetime field as string
oid_orig Original ObjectID Object ID of original feature from the Input Features parameter
group_id Group Identification Optional. Group Field values from the Input Features parameter
An output .lyrx file (symbology and layer settings) is created for the Output Feature Class and Output Sequence Points parameters. These are created in the nearest folder workspace that contains the output features.
Parameters
arcpy.intelligence.PointsToTrackSegments(in_features, date_field, out_feature_class, {group_field}, {include_velocity}, {out_point_feature_class})
Name | Explanation | Data Type |
in_features | 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.
| 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 |
Code sample
The following Python window script demonstrates how to use the PointsToTrackSegments function in immediate mode:
import arcpy
arcpy.PointsToTrackSegments_intelligence("C:/data/mtracks.gdb/source_pts",
"DateTime",
"C:/data/mtracks.gdb/tracklines",
"Name",
"INCLUDE_VELOCITY",
"C:/data/mtracks.gdb/seqpoints")
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"
# Execute PointsToTrackSegments
arcpy.PointsToTrackSegments_intelligence(in_features, date_time,
out_feature_class, group_field,
"INCLUDE_VELOCITY", out_points)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes