Reconstruct Tracks

Reconstruct Tracks

The Reconstruct Tracks task works with a time-enabled layer of either point or polygon features that represents 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 will create 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, suppose you have GPS measurements of hurricanes every 10 minutes. Each GPS measurement records the hurricane name, location, time of recording, and the wind speed. You could create tracks of the hurricanes using the name of the hurricane as the track identification, and all hurricanes' tracks would be generated. You could 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 URL

http://<analysis url>/ReconstructTracks/submitJob

Request parameters

ParameterDescription

inputLayer

(Required)

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

Syntax: As described in detail in the Feature input topic, 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 web example:

  • {"url" : "http://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}

REST scripting example:

  • "inputLayer" : {"url": "http://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 web example:

  • Hurricane Name
  • BoatName, ConvoyID

REST scripting example:

  • "trackFields" : "Hurricane Name"
  • "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—This 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.
  • Geodesic—This 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 web example: Geodesic

REST scripting example:"method" : "Planar"

bufferField

A field in the inputLayer that contains a buffer distance or a buffer expression.

REST web example:

  • = $feature["Setback"]
  • = $feature["Setback"] * 3 + $feature["TreeCoverage"]

REST scripting example:

  • "bufferField" : "= $feature['Setback']"
  • "bufferField" : "= $feature['Setback'] * 3 + $feature['TreeCoverage']"

A buffer expression must begin with an equal sign (=). To learn more about buffer expressions, see Buffer Expressions.

summaryFields

A list of field names and statistical summary types that you want to calculate for all reconstructed track features. By default, all statistics are returned.

Syntax: [{"statisticType" : "<statistic type>", "onStatisticField" : "<field name>" }, ...]

fieldName is the name of the fields found in the input point layer.

statisticType is one of the following for numeric fields:

  • Count—Totals the number of values of all the points in each polygon.
  • Sum—Adds the total value of all the points in each polygon.
  • Mean—Calculates the average of all the points in each polygon.
  • Min—Finds the smallest value of all the points in each polygon.
  • Max—Finds the largest value of all the points in each polygon.
  • Range—Finds the difference between the Min and Max values.
  • Stddev—Finds the standard deviation of all the points in each polygon.
  • Var—Finds the variance of all the points in each polygon.

statisticType is one of the following for string fields:

  • Count—Totals the number of strings for all the points in each polygon.
  • Any—Returns a sample string of a point in each polygon.

REST web examples:

  • [{"statisticType" : "Mean", "onStatisticField" : "Annual_Sales"},{"statisticType": "Sum", "onStatisticField": "Annual_Sales"}]
  • Only return count: []

REST scripting examples:

  • "summaryFields" : [{"statisticType" : "Mean", "onStatisticField" : "Annual_Sales"},{"statisticType": "Sum", "onStatisticField": "Annual_Sales"}]
  • Only return count: "summaryFields" : []

If you want to return only the Count statistic, specify an empty value: "summaryFields" : [].

timeSplit

A time duration used to split tracks. Any features in the inputLayer that are in the same track and are greater than this time apart 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 web examples:

  • 4
  • 53

REST scripting examples:

  • "timeSplit" : 4
  • "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 web example: Hours

REST scripting example: "timeSplitUnit" : "Minutes"

distanceSplit

A distance used to split tracks. Any features in the inputLayer that are in the same track and are greater than this distance apart 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 web examples:

  • 1.09361
  • 53.8

REST scripting examples:

  • "distanceSplit" : 12.4
  • "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 | Miles | NauticalMiles | Yards

REST web example: Hours

REST scripting example: "timeSplitUnit" : "Minutes"

outputName

(Required)

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

REST web example: myOutput

REST scripting example: "outputName" : "myOutput"

context

Context 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

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 Checking job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

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

Accessing 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:

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

ParameterDescription

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.

Example:
{"url": 
"http://<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.