- URL:https://<geoanalytics-url>/CreateSpaceTimeCube
- Version Introduced:10.5
Description
CreateSpaceTimeCube 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 feature 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 parameters
Parameter | Details |
---|---|
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:
Note: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 Examples
|
binSize (Required) | The distance for the bins into which pointLayer will be aggregated. REST Examples
|
binSizeUnit (Required) | The distance unit for the bins into which pointLayer will be aggregated. Values: Meters | Kilometers | Feet | Miles | NauticalMiles | Yards REST Examples
|
timeStepInterval (Required) | A numeric value that specifies the duration of the time bin. REST Examples
|
timeStepIntervalUnit (Required) | The duration unit of the time bin. Values: Meters | Kilometers | Feet | Miles | NauticalMiles | Yards REST Examples
|
timeStepAlignment (Optional) | Defines how aggregation will occur based on a given timeInterval. Options are as follows:
REST Examples
|
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 Examples
|
summaryFields (Optional) | 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. onStatisticField specifies the name of the fields in the target layer. statisticType can be specified as one of the following:
fillType can be set as one of the following:
REST Examples
|
outputName (Required) | Defines the name of the space time cube (netCDF) created by the operation. REST Examples
|
context (Optional) | The context parameter contains additional settings that affect task execution. For this task, there are two settings:
|
f | The response format. The default response format is html. Values: html | json |
Example usage
Below is a sample request URL for CreateSpaceTimeCube:
https://webadaptor.domain.com/server/rest/services/System/GeoAnalyticsTools/GPServer/CreateSpaceTimeCube/submitJob?pointLayer={"url":"https://webadaptor.domain.com/server/rest/services/Hurricane/hurricaneTrack/0"}&binSize=100&binSizeUnit=Meters&timeStepInterval=20&timeStepIntervalUnit=Minutes&timeStepAlignment=StartTime&summaryFields=[{"statisticType": "Mean", "onStatisticField": "Annual_Sales"},{"statisticType": "Sum", "onStatisticField": "Annual_Sales"}]&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.
{
"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>
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>/CreateSpaceTimeCube/jobs/<jobId>/results/outputCube?token=<your token>&f=json
Response | 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.
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.
When you browse to the output URL, your netCDF will automatically download to your local machine. |