Calculate Motion Statistics (GeoAnalytics)

Summary

Calculates motion statistics for points in a time-enabled feature class.

Illustration

Calculate Motion Statistics tool illustration
Time-enabled points are enriched with movement data.

Usage

  • This geoprocessing tool is available with ArcGIS Enterprise 10.9 or later.

  • The result of Calculate Motion Statistics is a copy of the input points with a new field for each calculated statistic.

  • You can specify one or more fields to identify unique entities, also known as tracks. Tracks are represented by the unique combination of one or more track fields. For example, if the fields flightID and Destination are used as track identifiers, the features ID007, Solden and ID007, Tokoyo would be in two separate tracks, since they have different Destination field values.

  • By default, all supported statistics will be calculated for each input point if possible. Alternatively, you can choose one or more groups of statistics to calculate using the Motion Statistics parameter.

    The following statistics fields will be calculated for the Distance group:

    • Distance—Distance traveled from the previous observation to the current.
    • TotDistance—Sum of distances traveled between observations in the track history window.
    • MinDistance—Minimum of distances traveled between observations in the track history window.
    • MaxDistance—Maximum of distances traveled between observations in the track history window.
    • AvgDistance—Average of distances traveled between observations in the track history window.

    The following statistics fields will be calculated for the Speed group:

    • Speed—Speed of travel from the previous observation to the current.
    • MinSpeed—Minimum speed between observations in the track history window.
    • MaxSpeed—Maximum speed between observations in the track history window.
    • AvgSpeed—Sum of distances between observations in the track history window divided by the sum of durations between observations in the track history window.

    The following statistics fields will be calculated for the Acceleration group:

    • Acceleration—Difference between the current speed and previous speed divided by the current duration.
    • MinAcceleration—Minimum acceleration calculated in the track history window.
    • MaxAcceleration—Maximum acceleration calculated in the track history window.
    • AvgAcceleration—Difference between the current and first speeds in the track history window divided by the sum of durations between observations in the track history window.

    The following statistics fields will be calculated for the Duration group:

    • Duration—Elapsed time since the previous observation.
    • TotDuration—Sum of durations in the track history window.
    • MinDuration—Minimum duration in the track history window.
    • MaxDuration—Maximum duration in the track history window.
    • AvgDuration—Sum of durations in the track history window divided by the number of durations calculated in the track history window.

    The following statistics fields will be calculated for the Elevation group:

    • Elevation—Current elevation of the observation.
    • ElevChange—Difference between the current elevation and the previous elevation.
    • TotElevChange—Sum of elevation changes between points in the track history window. This can be a negative value.
    • MinElevation—Minimum elevation in the track history window.
    • MaxElevation—Maximum elevation in the track history window.
    • AvgElevation—Sum of elevations in the track history window divided by the number of observations in the track history window.

    The following statistics fields will be calculated for the Slope group:

    • Slope—Ratio of elevation change to distance between the current and previous observations.
    • MinSlope—Minimum slope in the track history window.
    • MaxSlope—Maximum slope in the track history window.
    • AvgSlope—Sum of slopes in the track history window divided by the number of slopes calculated in the track history window.

    The following statistics fields will be calculated for the Idle group:

    • IdlingTrue if the distance between the current observation and the previous is less than the Idle Distance Tolerance parameter value, and the duration between the current observation and the previous is greater than the Idle Time Tolerance parameter value. False if one or both of these conditions are not met.
    • TotIdleTime—Sum of durations in the track history window that meet idling criteria.
    • PctIdleTime—Percentage of time for which idling was detected.

    The following statistics field will be calculated for the Bearing group:

    • Bearing—Angle of travel from the previous observation to the current observation.
  • Statistics starting with Min, Max, Avg, or Tot will be calculated using the current observation and a number of previous observations defined by the Track History Window parameter. Other statistics are always calculated using only the current and previous observation and do not consider Track History Window values. For example, if you set a Track History Window value of 5 and request the Speed statistic group, the current observation and the previous 4 observations will be used to calculate MinSpeed, MaxSpeed, and AvgSpeed fields at each observation, while the Speed field will be calculated using only the current and previous observations at each point. The Track History Window parameter value must be greater than 1. The default is 3.

  • The diagram below shows a track with six point features. The statistics are calculated based on each feature's elevation, distance, and time.

    A line representing time with six points along it each labeled with a time and distance

    The following table summarizes the statistics calculations for the diagram above. All calculations are evaluated at point 5 and the track history window is 3. An observation is considered idling if it has moved less than 32 meters in 1 minute.

    StatisticFormulaExample

    Distance

    35 m

    Total Distance

    80 + 30 + 35 = 145 m

    Speed

    Distance / Duration

    35 / 60 = 0.58 m/s

    Average Speed

    Total Distance / Total Duration

    145 / 180 m/s

    Acceleration

    (0.58 – 0.5) / 60 = 0.001 m/s2

    Average Acceleration

    (Speed (last) – Speed (first)) / (Total Duration)

    (0.58 – 1.33) / 60 = -0.01 m/s2

    Duration

    60 s

    Total Duration

    60 + 60 + 60 = 180 s

    Elevation

    5 m

    Elevation Change

    5 – 4 = 1 m

    Total Elevation Change

    5 – 0 = 5 m

    Slope

    Elevation Change / Distance

    1 / 35

    Average Slope

    Total Elevation Change / Total Distance

    5 / 145

    Idling

    False

    Total Idle Time

    60 s

    Percentage Idle Time

    1 / 3

    Bearing

    0

  • If there are fewer observations in a track's history than the Track History Window parameter value, statistics starting with Min, Max, Avg, or Tot will be calculated using all observations in the track history.

  • Statistics will not be calculated for the first feature in each track. Statistics in the Acceleration group will not be calculated for the first two features in each track.

  • The result values will be in the units specified by the Distance Unit, Duration Unit, Speed Unit, Acceleration Unit, and Elevation Unit parameters.

  • When calculating statistics on large tracks, you can use the Time Boundary Split parameter to split the large tracks into smaller tracks to improve performance.

  • This geoprocessing tool is powered by ArcGIS GeoAnalytics Server. Analysis is completed on your GeoAnalytics Server, and results are stored in your content in ArcGIS Enterprise.

  • When running GeoAnalytics Server tools, the analysis is completed on the GeoAnalytics Server. For optimal performance, make data available to the GeoAnalytics Server through feature layers hosted on your ArcGIS Enterprise portal or through big data file shares. Data that is not local to your GeoAnalytics Server will be moved to your GeoAnalytics Server before analysis begins. This means that it will take longer to run a tool, and in some cases, moving the data from ArcGIS Pro to your GeoAnalytics Server may fail. The threshold for failure depends on your network speeds, as well as the size and complexity of the data. Therefore, it is recommended that you always share your data or create a big data file share.

    Learn more about sharing data to your portal

    Learn more about creating a big data file share through Server Manager

  • You can improve the performance of the Calculate Motion Statistics tool by doing any or all of the following:

    • Set the extent environment so you only analyze data of interest.
    • Decrease the Track History Window parameter value.
    • Use the Time Boundary Split parameter to break up large tracks at a defined time interval.
    • Use data that is local to where the analysis is being run.

Parameters

LabelExplanationData Type
Input Layer

The time-enabled point features on which motion statistics will be calculated.

Feature Set
Output Name

The name of the result layer.

String
Track Fields

One or more fields used to identify distinct entities.

Field
Track History Window
(Optional)

The number of observations (including the current observation) that will be used for summary statistics. The default value is 3, which means that the summary statistics will be calculated at each point in a track using the current observation and the previous two observations. This parameter does not affect instantaneous statistics or idle classification.

Long
Motion Statistics
(Optional)

Specifies the group containing the statistics to be calculated and written to the result. If no value is provided, all statistics from all groups will be calculated.

  • Distance —The distance between the current and previous observation and the maximum, minimum, average, and total distance in the track history window will be calculated.
  • Duration —The duration between the current and previous observation and the maximum, minimum, average, and total duration in the track history window will be calculated.
  • Speed —The speed of travel between the current and previous observation and the maximum, minimum, and average speed in the track history window will be calculated.
  • Acceleration —The acceleration between the current speed and the previous speed and the maximum, minimum, and average acceleration in the track history window will be calculated.
  • Elevation —The current elevation, the elevation change between the current and previous observation, and the maximum, minimum, average, and total elevation change in the track history window will be calculated.
  • Slope —The slope between the current and previous observation and the maximum, minimum, and average slope in the track history window will be calculated.
  • Idle —Whether an entity is currently idling, as well as the percentage idle time and total idle time in the track history window will be calculated.
  • Bearing —The angle of travel between the previous observation and the current observation will be calculated.
String
Distance Method
(Optional)

Specifies the distance measurement method that will be used when calculating motion statistics.

  • Geodesic —Geodesic distance will be used.
  • Planar —Planar distance will be used. This is the default.
String
Idle Distance Tolerance
(Optional)

The maximum distance that two sequential points in a track can be apart and still be considered idle. This parameter is used with the Idle Time Tolerance parameter to determine if an entity is idling. The Idle Distance Tolerance parameter is required if the Idle statistic group is specified in the Motion Statistics parameter or if statistics in all the groups will be calculated.

Linear Unit
Idle Time Tolerance
(Optional)

The minimum duration that two sequential points in a track must be near each other to be considered idle. This parameter is used with the Idle Distance Tolerance parameter to determine if an entity is idling. The Idle Time Tolerance parameter is required if the Idle statistic group is specified in the Motion Statistics parameter or if statistics in all the groups will be calculated.

Time Unit
Time Boundary Split
(Optional)

A time span to split the input data into for analysis. A time boundary allows you to analyze values within a defined time span. For example, if you use a time boundary of 1 day, starting on January 1, 1980, tracks will be split at the beginning of every day. This parameter is only available with ArcGIS Enterprise 10.7 and later.

Time Unit
Time Boundary Reference
(Optional)

The reference time used to split the input data into for analysis. Time boundaries will be created for the entire span of the data, and the reference time does not need to occur at the start. If no reference time is specified, January 1, 1970, is used. This parameter is only available with ArcGIS Enterprise 10.7 and later.

Date
Distance Unit
(Optional)

Specifies the unit of measure for distance values in the output feature class.

  • Meters —The unit of measure will be meters. This is the default.
  • Kilometers —The unit of measure will be kilometers.
  • Miles —The unit of measure will be miles.
  • Nautical Miles —The unit of measure will be nautical miles.
  • Yards —The unit of measure will be yards.
  • Feet —The unit of measure will be feet.
String
Duration Unit
(Optional)

Specifies the unit of measure for duration values in the output feature class.

  • Years —The unit of measure will years.
  • Months —The unit of measure will be months.
  • Weeks —The unit of measure will be weeks.
  • Days —The unit of measure will be days.
  • Hours —The unit of measure will be hours.
  • Minutes —The unit of measure will be minutes.
  • Seconds —The unit of measure will be seconds. This is the default.
  • Milliseconds —The unit of measure will be milliseconds.
String
Speed Unit

Specifies the unit of measure for speed values in the output feature class.

  • Meters Per Second —The unit of measure will be meters per second. This is the default.
  • Miles Per Hour —The unit of measure will be miles per hour.
  • Kilometers Per Hour —The unit of measure will be kilometers per hour.
  • Feet Per Second —The unit of measure will be feet per second.
  • Nautical Miles Per Hour —The unit of measure will be nautical miles per hour.
String
Acceleration Unit
(Optional)

Specifies the unit of measure for acceleration values in the output feature class.

  • Meters Per Second Squared —The unit of measure will be meters per second squared. This is the default.
  • Feet Per Second Squared —The unit of measure will be feet per second squared.
String
Elevation Unit
(Optional)

Specifies the unit of measure for elevation values in the output feature class.

  • Meters —The unit of measure will be meters. This is the default.
  • Kilometers —The unit of measure will be kilometers.
  • Miles —The unit of measure will be miles.
  • Nautical Miles —The unit of measure will be nautical miles.
  • Yards —The unit of measure will be yards.
  • Feet —The unit of measure will be feet.
String
Data Store
(Optional)

Specifies the ArcGIS Data Store where the output will be saved. The default is SPATIOTEMPORAL_DATA_STORE. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.

  • Spatiotemporal big data store —Output will be stored in a spatiotemporal big data store. This is the default.
  • Relational data store —Output will be stored in a relational data store.
String

Derived Output

LabelExplanationData Type
Output Feature Layer

The output point features with motion statistics.

Feature Set

arcpy.geoanalytics.CalculateMotionStatistics(input_layer, output_name, track_fields, {track_history_window}, {motion_statistics}, {distance_method}, {idle_dist_tolerance}, {idle_time_tolerance}, {time_boundary_split}, {time_boundary_reference}, {distance_unit}, {duration_unit}, speed_unit, {acceleration_unit}, {elevation_unit}, {data_store})
NameExplanationData Type
input_layer

The time-enabled point features on which motion statistics will be calculated.

Feature Set
output_name

The name of the result layer.

String
track_fields
[track_fields,...]

One or more fields used to identify distinct entities.

Field
track_history_window
(Optional)

The number of observations (including the current observation) that will be used for summary statistics. The default value is 3, which means that the summary statistics will be calculated at each point in a track using the current observation and the previous two observations. This parameter does not affect instantaneous statistics or idle classification.

Long
motion_statistics
[motion_statistics,...]
(Optional)

Specifies the group containing the statistics to be calculated and written to the result. If no value is provided, all statistics from all groups will be calculated.

  • DISTANCEThe distance between the current and previous observation and the maximum, minimum, average, and total distance in the track history window will be calculated.
  • DURATIONThe duration between the current and previous observation and the maximum, minimum, average, and total duration in the track history window will be calculated.
  • SPEEDThe speed of travel between the current and previous observation and the maximum, minimum, and average speed in the track history window will be calculated.
  • ACCELERATIONThe acceleration between the current speed and the previous speed and the maximum, minimum, and average acceleration in the track history window will be calculated.
  • ELEVATIONThe current elevation, the elevation change between the current and previous observation, and the maximum, minimum, average, and total elevation change in the track history window will be calculated.
  • SLOPEThe slope between the current and previous observation and the maximum, minimum, and average slope in the track history window will be calculated.
  • IDLEWhether an entity is currently idling, as well as the percentage idle time and total idle time in the track history window will be calculated.
  • BEARINGThe angle of travel between the previous observation and the current observation will be calculated.
String
distance_method
(Optional)

Specifies the distance measurement method that will be used when calculating motion statistics.

  • GEODESICGeodesic distance will be used.
  • PLANARPlanar distance will be used. This is the default.
String
idle_dist_tolerance
(Optional)

The maximum distance that two sequential points in a track can be apart and still be considered idle. This parameter is used with the idle_time_tolerance parameter to determine if an entity is idling. The idle_dist_tolerance parameter is required if the IDLE statistic group is specified in the motion_statistics parameter or if statistics in all the groups will be calculated.

Linear Unit
idle_time_tolerance
(Optional)

The minimum duration that two sequential points in a track must be near each other to be considered idle. This parameter is used with the idle_dist_tolerance parameter to determine if an entity is idling. The idle_time_tolerance parameter is required if the IDLE statistic group is specified in the motion_statistics parameter or if statistics in all the groups will be calculated.

Time Unit
time_boundary_split
(Optional)

A time span to split the input data into for analysis. A time boundary allows you to analyze values within a defined time span. For example, if you use a time boundary of 1 day, starting on January 1, 1980, tracks will be split at the beginning of every day. This parameter is only available with ArcGIS Enterprise 10.7 and later.

Time Unit
time_boundary_reference
(Optional)

The reference time used to split the input data into for analysis. Time boundaries will be created for the entire span of the data, and the reference time does not need to occur at the start. If no reference time is specified, January 1, 1970, is used. This parameter is only available with ArcGIS Enterprise 10.7 and later.

Date
distance_unit
(Optional)

Specifies the unit of measure for distance values in the output feature class.

  • METERSThe unit of measure will be meters. This is the default.
  • KILOMETERSThe unit of measure will be kilometers.
  • MILESThe unit of measure will be miles.
  • NAUTICAL_MILESThe unit of measure will be nautical miles.
  • YARDSThe unit of measure will be yards.
  • FEETThe unit of measure will be feet.
String
duration_unit
(Optional)

Specifies the unit of measure for duration values in the output feature class.

  • YEARSThe unit of measure will years.
  • MONTHSThe unit of measure will be months.
  • WEEKSThe unit of measure will be weeks.
  • DAYSThe unit of measure will be days.
  • HOURSThe unit of measure will be hours.
  • MINUTESThe unit of measure will be minutes.
  • SECONDSThe unit of measure will be seconds. This is the default.
  • MILLISECONDSThe unit of measure will be milliseconds.
String
speed_unit

Specifies the unit of measure for speed values in the output feature class.

  • METERS_PER_SECONDThe unit of measure will be meters per second. This is the default.
  • MILES_PER_HOURThe unit of measure will be miles per hour.
  • KILOMETERS_PER_HOURThe unit of measure will be kilometers per hour.
  • FEET_PER_SECONDThe unit of measure will be feet per second.
  • NAUTICAL_MILES_PER_HOURThe unit of measure will be nautical miles per hour.
String
acceleration_unit
(Optional)

Specifies the unit of measure for acceleration values in the output feature class.

  • METERS_PER_SECOND_SQUAREDThe unit of measure will be meters per second squared. This is the default.
  • FEET_PER_SECOND_SQUAREDThe unit of measure will be feet per second squared.
String
elevation_unit
(Optional)

Specifies the unit of measure for elevation values in the output feature class.

  • METERSThe unit of measure will be meters. This is the default.
  • KILOMETERSThe unit of measure will be kilometers.
  • MILESThe unit of measure will be miles.
  • NAUTICAL_MILESThe unit of measure will be nautical miles.
  • YARDSThe unit of measure will be yards.
  • FEETThe unit of measure will be feet.
String
data_store
(Optional)

Specifies the ArcGIS Data Store where the output will be saved. The default is SPATIOTEMPORAL_DATA_STORE. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.

  • SPATIOTEMPORAL_DATA_STOREOutput will be stored in a spatiotemporal big data store. This is the default.
  • RELATIONAL_DATA_STOREOutput will be stored in a relational data store.
String

Derived Output

NameExplanationData Type
output

The output point features with motion statistics.

Feature Set

Code sample

CalculateMotionStatistics example (stand-alone script)

The following Python script demonstrates how to use the CalculateMotionStatistics function.

# Name: CalculateMotionStatistics.py
# Description: Calculate speed, acceleration, and bearing for hurricane tracks.
# Requirements: ArcGIS GeoAnalytics Server

# Import system modules
import arcpy

# Set local variables
inFeatures = "https://mydomain.com/server/rest/services/DataStoreCatalogs/bigDataFileShares_Hurricanes/BigDataCatalogServer/all"
out = "Hurricanes_MotionStats"
trackField = "name"

# Execute Calculate Motion Statistics
arcpy.geoanalytics.CalculateMotionStatistics(inFeatures, out, trackField, 5, 
                                             ["SPEED", "ACCELERATION", "BEARING"], 
                                             "GEODESIC")

Environments

Output Coordinate System

The coordinate system that will be used for analysis. Analysis will be completed in the input coordinate system unless specified by this parameter. For GeoAnalytics Tools, final results will be stored in the spatiotemporal data store in WGS84.

Licensing information

  • Basic: Requires ArcGIS GeoAnalytics Server
  • Standard: Requires ArcGIS GeoAnalytics Server
  • Advanced: Requires ArcGIS GeoAnalytics Server

Related topics