Create Space Time Cube
![]() |
Create Space Time Cube works with a layer of point features that are time enabled. It aggregates the data into a three-dimensional cube of space-time bins. When determining the point in a space-time bin relationship, statistics about all points in the space-time bins are calculated and assigned to the bins. The most basic statistic is the number of points within the bins, but you can calculate other statistics as well.
For example, suppose you have point features of crimes in a city, and you want to summarize the number of crimes in both space and time. You can calculate the space-time cube for the dataset, and use the cube to further analyze trends such as emerging hot and cold spots.
Request URL
http://<analysis url>/CreateSpaceTimeCube/submitJob
Request parameters
Parameter | Description |
|---|---|
pointLayer (Required) | The point features that will be aggregated into the bins specified in geographical size by the binSize and binSizeUnit parameters and temporal size by the timeStepInterval and timeStepIntervalUnit parameters. Syntax: As described in Feature input, this parameter can be one of the following:
Analysis using bins requires a projected coordinate system. When aggregating layers into bins, the input layer or processing extent (processSR) must have a projected coordinate system. At 10.5.1, 10.6, and 10.6.1, if a projected coordinate system is not specified when running analysis, the World Cylindrical Equal Area (WKID 54034) projection will be used. At 10.7 or later, if a projected coordinate system is not specified when running analysis, a projection will be picked based on the extent of the data. REST web example:
REST scripting example:
|
binSize (Required) | The distance for the bins into which pointLayer will be aggregated. REST web example: 108.3 REST scripting example: "binSize" : 100 |
binSizeUnit (Required) | The distance unit for the bins into which pointLayer will be aggregated. Values: Meters | Kilometers | Feet | Miles | NauticalMiles | Yards REST web example: Meters REST scripting example: "binSizeUnit" : "Miles" |
timeStepInterval (Required) | A numeric value that specifies the duration of the time bin. REST web example: 20 REST scripting example: "timeStepInterval" : 20 |
timeStepIntervalUnit (Required) | A numeric value that specifies the duration unit of the time bin. Values: Milliseconds | Seconds | Minutes | Hours | Days | Weeks| Months | Years REST web example: Minutes REST scripting example: "timeStepIntervalUnit" : "Minutes" |
timeStepAlignment | Defines how aggregation will occur based on a given timeInterval. Options are as follows:
REST web example: StartTime REST scripting example: "timeStepAlignment" : "StartTime" |
timeStepReference (Required if timeStepAlignment is ReferenceTime) | A date that specifies the reference time to align the time bins to if ReferenceTime is specified in timeIntervalAlignment. This time is given in milliseconds from epoch. REST web example: 946684800000 REST scripting example: "timeStepReference" : 946684800000 |
summaryFields | A list of field names, statistical summary types, and the fill option for empty values that you want to calculate for all points within each space-time bin. Note that the count of points within each bin is always returned. By default, all statistics are returned. Syntax: [{"statisticType": "<statistic type>", "onStatisticField" : "<field name>", "fillType" : "<fill type>" }, ...] fieldName is the name of the fields found in the input point layer. statististicType is one of the following for numeric fields:
statisticType is the following for string fields:
fillType is one of the following:
REST web example: [{"statisticType": "Count", "onStatisticField": "newEmployees", "fillType" : "zeros" },{"statisticType": "Sum", "onStatisticField": "Annual_Sales", "fillType" : "temporalTrend"}] REST scripting example: "summaryFields" : [{"statisticType": "Count", "onStatisticField": "newEmployees", "fillType" : "zeros" },{"statisticType": "Sum", "onStatisticField": "Annual_Sales", "fillType" : "temporalTrend"}] |
outputName (Required) | The task will create a space time cube (netCDF) of the results. You define the name of the space time cube. REST web example: myOutput REST scripting example: "outputName" : "myOutput" |
context | Context contains additional settings that affect task execution. For this task, there are three settings:
Syntax: |
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.
{
"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 jobId to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/CreateSpaceTimeCube/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>/CreateSpaceTimeCube/jobs/<jobId>/results/outputCube?token=<your token>&f=json
Parameter | Description |
|---|---|
outputCube |
outputCube will always contain a netCDF cube. The number of resulting bins in the cube is dependent on the location of inputPoints and the bin size settings. If a summaryFields parameter is specified in the task request, the layer will compute the count statistic, as well as anything specified in summaryFields. Request example: 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 parameter contains the URL of the output cube. |
