ArcGIS REST API

Enrich From Multi-Variable Grid

Enrich From Multi-Variable Grid

The Enrich From Multi-Variable Grid task joins attributes from a multivariable grid to a point layer. The multivariable grid must be created using the Build Multi-Variable Grid task. Metadata from the multivariable grid is used to efficiently enrich the input point features, making it faster than the Join Features task. Attributes in the multivariable grid are joined to the input point features when the features intersect the grid.

The attributes in the multivariable grid can be used as explanatory variables when modeling spatial relationships with your input point features, and this task allows you to join those attributes to the point features quickly.

Request URL

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

Request parameters

ParameterDescription

inputFeatures

(Required)

The point features that will be enriched by the multivariable grid.

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 web example:

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

REST scripting example:

  • "inputFeatures" : {"url": "https://myportal.domain.com/server/rest/services/Hosted/point_observations/FeatureServer/0", "filter": "ID > 10"}

gridLayer

(Required)

The multivariable grid layer created using the Build Multi-Variable Grid task.

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 web example:

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

REST scripting example:

  • "gridLayer" : {"url": "https://myportal.domain.com/server/rest/services/Hosted/us_econ_mvgrid/FeatureServer/0", "filter": "State = 'California'"}

enrichAttributes

(Optional)

A list of fields in the multivariable grid that will be joined to the input point features. If enrichAttributes is not provided, all fields in the multivariable grid will be joined to the input point features.

REST web example :distance_nearest_flood, sum_population, nearest_shelter

REST scripting example : "enrichAttributes" : "distance_nearest_flood, sum_population, nearest_shelter"

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

The context parameter contains additional settings that affect task execution. For this task, there are five 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.
  • Default aggregation styles (defaultAggregationStyles)—If set to true, results will have square, hexagon, and triangle aggregation styles enabled on results map services.

Syntax:
{
"extent" : {extent},
"processSR" : {spatial reference},
"outSR" : {spatial reference},
"dataStore":{data store},
"defaultAggregationStyles": {true|false}
}

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 jobId to retrieve the results. To track the status, you can make a request of the following form:

https://<analysis url>/EnrichFromMultiVariableGrid/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:

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

ParameterDescription

output

The output parameter will contain a new layer of the input point features with attribute values from the multivariable grid. Each new field represents a joined value from the grid.

Request example:
{"url": 
"http://<analysis url>/EnrichFromMultiVariableGrid/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.