Skip To Content

Reconstruct Tracks

Description

Reconstruct Tracks

The ReconstructTracks operation works with a time-enabled layer of either point or polygon features that represent an instant in time. It first determines which features belong to a track using an identifier. Using the time at each location, the tracks are ordered sequentially and transformed into a line or polygon representing the path of movement over time. Optionally, the input can be buffered by a field, which creates a polygon at each location. These buffered points, or polygons if the inputs are polygons, are then joined sequentially to create a track as a polygon where the width is representative of the attribute of interest. Resulting tracks have start and end times that represent the time at the first and last feature in a given track. When the tracks are created, statistics about the input features are calculated and assigned to the output track. The most basic statistic is the count of points within the area, but other statistics can be calculated as well. Features in time-enabled layers can be represented in one of two ways:

  • Instant—A single moment in time
  • Interval—A start and end time

For example, you have GPS measurements of hurricanes every 10 minutes. Each GPS measurement records the hurricane name, location, time of recording, and wind speed. You can create tracks of the hurricanes using the name of the hurricane as the track identification, and all hurricanes' tracks will be generated. You can calculate statistics such as the mean, maximum, and minimum wind speed of each hurricane, as well as the count of measurements in each track.

Request parameters

ParameterDetails
inputLayer

(Required)

The point or polygon features from which tracks will be constructed.

Syntax: As described in Feature input, this parameter can be one of the following:

  • A URL to a feature service layer with an optional filter to select specific features
  • A URL to a big data catalog service layer with an optional filter to select specific features
  • A feature collection

REST examples

//REST web example
{"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}

//REST scripting example
"inputLayer": {"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}
trackFields

(Required)

The fields used to identify distinct tracks. There can be multiple trackFields.

REST examples

//REST web example
Hurricane Name

//REST scripting Example
"trackFields": "BoatName, ConvoyID"
method

(Required)

The method used to apply reconstruct tracks and, optionally, to apply the buffer. There are two methods to choose from: Planar and Geodesic. The Planar method joins points using a plane method and will not cross the international date line. For buffers, this method applies a Euclidean buffer and is appropriate for local analysis on projected data. This is the default. The Geodesic method joins points geodesically and will allow tracks to cross the international date line. For buffers, this method is appropriate for large areas and any geographic coordinate system.

REST examples

//REST web example
Geodesic

//REST scripting example
"method": "Planar"
bufferField

(Optional)

A field in the inputLayer that contains a buffer distance or a buffer expression. A buffer expression must begin with an equal sign (=). To learn more about buffer expressions, see Buffer Expressions.

REST examples

//REST web example
= $feature["Setback"] * 3 + $feature["TreeCoverage"]

//REST scripting examples
"bufferField": "= $feature['Setback'] * 3 + $feature['TreeCoverage']"
summaryFields

(Optional)

A list of field names and statistical summary types you want to calculate. Note that the count is always returned. By default, all statistics are returned.

onStatisticField specifies the name of the fields in the target layer. statisticType is one of the following for numeric fields:

  • Count—For numeric fields, this totals the number of values of all the points in each polygon. For string fields, this totals the number of strings for all the points in each polygon.
  • Sum—Adds the total value of all the points in each polygon for numeric fields.
  • Mean—Calculates the average of all the points in each polygon. For numeric fields.
  • Max—Calculates the largest value of all the points in each polygon. For numeric fields.
  • Range—Finds the difference between the Min and Max values. For numeric fields.
  • Stddev—Finds the standard deviation of all the points in each polygon. For numeric fields.
  • Var—Finds the variance of all the points in each polygon. For numeric fields.
  • Any—Returns a sample string of a point in each polygon for string fields.
  • First—Returns the first value of a specified field in the summarized track for string and numeric fields. This parameter was introduced at ArcGIS Enterprise 10.8.1.
  • Last—Returns the last value of a specified field in the summarized track for string and numeric fields. This parameter was introduced at ArcGIS Enterprise 10.8.1.

REST examples

//REST web examples
[{"statisticType": "Mean", "onStatisticField": "Annual_Sales"},{"statisticType": "Sum", "onStatisticField": "Annual_Sales"}]

//REST scripting example
"summaryFields": ["statisticType": "Mean", "onStatisticField": "Annual_Sales"},{"statisticType": "Sum", "onStatisticField": "Annual_Sales"}]

//Only return Count
"summaryFields": []
timeSplit

(Optional)

A time duration used to split tracks. Any features in the inputLayer that are in the same track and are farther apart than this time will be split into a new track. The units of the distance values are supplied by the timeSplitUnit parameter. If both distanceSplit and timeSplit are used, a track is split when at least one condition is met.

REST examples

//REST web example
53

//REST scripting example
"timeSplit": 53
timeSplitUnit

(Required if timeSplit is specified)

The temporal unit to be used with the temporal distance value specified in timeSplit.

Values: Milliseconds | Seconds | Minutes | Hours | Days | Weeks| Months | Years

REST examples

//REST web example
Hours

//REST scripting example
"timeSplitUnit": "Minutes"
distanceSplit

(Optional)

A distance used to split tracks. Any features in the inputLayer that are in the same track and are farther apart than this distance will be split into a new track. The units of the distance values are supplied by the distanceSplitUnit parameter. If both distanceSplit and timeSplit are used, the track is split when at least one condition is met.

REST examples

//REST web example
53.8

//REST scripting example
"distanceSplit": 1001
distanceSplitUnit

(Required if distanceSplit is specified)

The distance unit to be used with the distance value specified in distanceSplit.

Values: Meters | Kilometers | Feet | FeetInt | FeetUS | Miles | MilesInt | MilesUS | NauticalMiles | NauticalMilesInt | NauticalMilesUS | Yards | YardsInt | YardsUS

REST examples

//REST web example
Meters

//REST scripting example
"distanceSplitUnit": "Miles"
timeBoundarySplit

(Optional)

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.

REST examples

//REST web example
1

//REST scripting example
"timeBoundarySplit": 2
timeBoundarySplitUnit

(Required if timeBoundarySplit is specified)

The unit applied to the time boundary. timeBoundarySplitUnit is required if a timeBoundarySplit is provided.

Values: Milliseconds | Seconds | Minutes | Hours | Days | Weeks| Months | Years

REST examples

//REST web example
Weeks

//REST scripting example
"timeBoundarySplitUnit": "Days"
timeBoundaryReference

(Optional)

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 timeBoundarySplit and timeBoundarySplitUnit are set.

REST examples

//REST web example
9466835800000

//REST scripting example
"timeBoundaryReference": 946684800000
arcadeSplit

(Optional)

An expression that splits tracks based on values, geometry, or time values. Expressions that validate to true will be split. This parameter is only available with ArcGIS Enterprise 10.9 and later.

REST examples

//REST web example
var speed = TrackFieldWindow("WindSpeed", -1, 1); 2* speed[0] < speed[1]

//REST scripting example
"arcadeSplit": "var speed = TrackFieldWindow("WindSpeed", -1, 1); 2* speed[0] < speed[1]"
splitBoundaryOption

(Optional)

Specifies how the track segment between two features is created when a track is split. The split type is applied to split expressions, distance splits, and time splits. This parameter is only available with ArcGIS Enterprise 10.9 and later.

  • Gap—No segment is created between the two features. This is the default.
  • FinishLast—A segment is created between the two features that ends after the split.
  • StartNext—A segment is created between the two features that ends before the split.

REST examples

//REST web example
Gap

//REST scripting example
"splitBoundaryOption": "FinishLast"
outputName

(Required)

The task will create a feature service of the results. You define the name of the service.

REST examples

//REST web example
myOutput

//REST scripting example
"outputName": "myOutput"
context

(Optional)

The context parameter contains additional settings that affect task execution. For this task, there are four settings:

  • Extent (extent)—A bounding box that defines the analysis area. Only those features that intersect the bounding box will be analyzed.
  • Processing spatial reference (processSR)—The features will be projected into this coordinate system for analysis.
  • Output spatial reference (outSR)—The features will be projected into this coordinate system after the analysis to be saved. The output spatial reference for the spatiotemporal big data store is always WGS84.
  • Data store (dataStore)—Results will be saved to the specified data store. The default is the spatiotemporal big data store.

Syntax:
{
"extent" : {extent},
"processSR" : {spatial reference},
"outSR" : {spatial reference},
"dataStore":{data store}
}

f

The response format. The default response format is html.

Values: html | json

Example usage

Below is a sample request URL for ReconstructTracks:

https://webadaptor.domain.com/server/rest/services/System/GeoAnalyticsTools/GPServer/ReconstructTracks/submitJob?inputLayer={"url":"https://webadaptor.domain.com/server/rest/services/Hurricane/hurricaneTrack/0"}&trackFields=Hurricane Name&method=Gedesic&timeSplit=53&timeSplitUnit=Minutes&distanceSplit=25&distanceSplitUnit=Miles&timeBoundarySplit=1&timeBoundarySplitUnit=Weeks&timeBoundaryReference=9466835800000&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 jobId to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use jobId to retrieve the results. To track the status, you can make a request of the following form:

https://<analysis url>/ReconstructTracks/jobs/<jobId>

Access results

When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:

https://<analysis-url>/ReconstructTracks/jobs/<jobId>/results/output?token=<your token>&f=json

ResponseDescription
output

The output tracks will be lines if points were given as inputLayer without a buffer. The output tracks will be polygons if points were given as an input with a buffer applied or if polygons were given as the input.

{"url": "https://<analysis-url>/ReconstructTracks/jobs/<jobId>/results/output"}

The result has properties for parameter name, data type, and value. The contents of value depend on the outputName parameter provided in the initial request. The value contains the URL of the feature service layer.

{
"paramName":"output", 
"dataType":"GPRecordSet",
"value":{"url":"<hosted featureservice layer url>"}
}

See Feature output for more information about how the result layer is accessed.