- URL:
- https://<geoanalytics-url>/CalculateMotionStatistics
- Methods:
GET
- Version Introduced:
- 10.9
Description
The Calculate Motion Statistics task calculates motion statistics and descriptors for time-enabled points that represent one or more moving entities. Points are grouped together into tracks representing each entity using a unique identifier. Motion statistics are calculated at each point using one or more points in the track history. Calculations include summaries of distance traveled, duration, elevation, speed, acceleration, bearing, and idle status. The result is a new point layer enriched with the requested statistics.
For example, a city is monitoring snowplow operations and wants to better understand vehicle movement. The Calculate Motion Statistics tool can be used to determine idle locations and time spent idling, average and maximum speeds over time, total distance covered, and other statistics.
Request parameters
Parameter | Details |
---|---|
| The time-enabled point features that will be grouped into tracks and analyzed. The input layer must be of time type instant. Syntax: As described in Feature input, this parameter can be one of the following:
REST examples
|
| The fields used to identify distinct tracks. There can be multiple REST examples
|
| The number of observations (including the current observation) that will be used when calculating summary statistics that are not instantaneous. This includes minimum, maximum, average, and total statistics. The default track history window is 3, which means that at each point in a track summary, statistics will be calculated using the current observation and the previous two observations. This parameter does not affect instantaneous statistics or idle classification. REST examples
|
| Specifies the statistic groups that will be calculated. See the table below for a description of the statistics included with each group. By default, all statistic groups will be calculated. Optionally, specify one or more groups of statistics to be calculated. The group options are as follows:
REST examples
|
| Used along with REST examples
|
| The unit of the REST examples
|
| Used along with REST examples
|
| The unit of the REST examples
|
|
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 analyzed one day at a time. The REST examples
|
|
The unit applied to the time boundary. Values: REST examples
|
|
A date that specifies the reference time to align the time boundary to, represented in milliseconds from epoch. The default is January 1, 1970, at 12:00 a.m. (epoch time stamp 0). This option is only available if the REST examples
|
| The method used to calculate distances between track observations. There are two methods to choose from: REST examples
|
| The units for all results in the Values: The default is REST examples
|
| The units for all results in the Values: The default is REST examples
|
| The units for all results in the REST examples
|
| The units for all results in the REST examples
|
| The units for all results in the The default is REST examples
|
|
The task will create a feature service of the results. You define the name of the service. REST examples
|
|
The
Syntax:
|
|
The response format. The default response format is Values: |
motionStatistics calculation groups
The tables below describe the statistics that will be calculated for each motion statistic group specified. Each statistic will be added as a new field to the point layer.
Distance
Statistic | Description |
---|---|
Distance | Distance traveled from the previous observation to the current observation. |
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. |
Speed
Statistic | Description |
---|---|
Speed | Speed of travel from the previous observation to the current observation. |
MinSpeed | Minimum speed between observations in the track history window. |
MaxSpeed | Maximum speed between observations in the track history window. |
AvgSpeed | The sum of distances between observations in the track history window divided by the sum of durations between observations in the track history window. |
Acceleration
Statistic | Description |
---|---|
Acceleration | The 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. |
Duration
Statistic | Description |
---|---|
Duration | The 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 in the window. |
Elevation
Statistic | Description |
---|---|
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 size of the track history window. |
Slope
Statistic | Description |
---|---|
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 in the window. |
Idle
Statistic | Description |
---|---|
Idling |
|
TotIdleTime | Sum of durations in the track history window that meet idling criteria. |
PctIdleTime | Percentage of time for which idling was detected. |
Bearing
Statistic | Description |
---|---|
Bearing | Angle of travel from the previous observation to the current observation. |
Example usage
Below is a sample request URL for Calculate
:
https://webadaptor.domain.com/server/rest/services/System/GeoAnalyticsTools/GPServer/CalculateMotionStatistics/submitJob?inputLayer={"url":"https://webadaptor.domain.com/server/rest/services/Hurricane/hurricaneTrack/0"}&trackFields=Hurricane Name&trackHistoryWindow=10&motionStatistics=Duration,Slope&idleDistanceTolerance=10&idleDistanceToleranceUnit=Minutes&idleTimeTolerance=1&idleTimeToleranceUnit=Hours&timeBoundarySplit=6&timeBoundarySplitUnit=Hours&timeBoundaryReference=9466835800000&method=geodesic&outputName=myOutput&context={"extent":{"xmin":-122.68,"ymin":45.53,"xmax":-122.45,"ymax":45.6,"spatialReference":{"wkid":4326}}}&f=json
Response
When you submit a request, the service assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use job
to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use job
to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/CalculateMotionStatistics/jobs/<jobId>
Access results
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form:
https://<analysis-url>/CalculateMotionStatistics/jobs/<jobId>/results/output?token=<your token>&f=json
Response | Description |
---|---|
| The
The result has properties for parameter name, data type, and value. The contents of
See Feature output for more information about how the result layer is accessed. |