Interpolate points

An interpolation analysis resulting in a new layer with predicted elevation values from point features in Oregon.

What is an interpolation analysis?

An interpolation analysis is the process of estimating and predicting the location of new features and attribute values by using point features with numeric fields. To execute the analysis, use the spatial analysis service and the InterpolatePoints.

interpolate points

Real-world examples of this analysis include the following:

  • Interpolating air quality, soil nutrients, and rainfall levels.
  • Predicting heavy metal concentrations.
  • Predicting earthquake magnitudes.

How to perform an interpolation analysis

The general steps to performing an interpolation analysis are as follows:

  1. Review the parameters for the InterpolatePoints operation.
  2. Send a request to get the spatial analysis service URL.
  3. Execute a job request with the following URL and parameters:
    • URL: https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/InterpolatePoints/submitJob
    • Parameters:
      • inputLayer: Your points dataset as a hosted feature layer or feature collection.
      • field: The numeric field containing the values to interpolate.
      • outputName: A string representing the name of the hosted feature layer to reutrn with the results.
  4. Check the status.
  5. Get the output layer results.

To see examples using ArcGIS API for Python, ArcGIS REST JS, and the ArcGIS REST API, go to Examples below.

URL request

Use dark colors for code blocksCopy
 
1
https://analysis3.arcgis.com/arcgis/rest/services/tasks/GPServer/CalculateDensity/submitJob?<parameters>

Required parameters

NameDescriptionExamples
fThe format of the data returned.f=json f=pjson
tokenAn OAuth 2.0 access token. Learn how to get an access token in Security and authentication.token=<ACCESS_TOKEN>
inputLayerThe point feature collection or hosted feature layer.{url:"https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Average_temperature_Oregon/FeatureServer/0"}
fieldThe numeric field containing the values to interpolate.Elevation

Key parameters

NameDescriptionExamples
interpolateOptionA value declaring the preference for speed versus accuracy. The default is 5.1, 5, 9
classificationTypeDetermines how the predicted values will be classified into areas. The default is GeometricInterval.EqualArea, EqualInterval, GeometricInterval, Manual
classBreaksIf the classificationType is Manual, then provide the class break values as a list.[1,3,5]
boundingPolygonLayerThe layer specifying the polygons in which you want values to be interpolated.{url:"https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Delaware_County_Municipal_Boundaries/FeatureServer/0"}
outputNameA string representing the name of the hosted feature layer to return with the results. NOTE: If you do not include this parameter, the results are returned as a feature collection (JSON).{"serviceProperties": {"name": "<SERVICE_NAME>"}}
contextA bounding box or output spatial reference for the analysis."extent":{"xmin:", "ymin:", "xmax:", "ymax:"}

Examples

Predict air quality

This example uses the InterpolatePoints operation to predict the air quality index (AQI) based on particle values that are 10 micrometers or smaller.

In the analysis, the inputLayer value is the AQI PM10 hosted feature layer. The DAILY_AQI_LEVEL is the field used to interpolate values.

Interpolation analysis showing the air quality indices for California.

APIs

ArcGIS REST JSArcGIS REST JSArcGIS API for Python
Expand
Use dark colors for code blocksCopy
                                                                                     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  const operationUrl = `${analysisUrl}/InterpolatePoints/submitJob`;

  const params = {

    inputLayer: {
      url:
        "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/aqi_pm10/FeatureServer/0",
    },
    field: "DAILY_AQI_VALUE",
    interpolateOption: 5,
    classificationType: "GeometricInterval",
    numClasses: 10,
    boundingPolygonLayer: {
      url:
        "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/California_State_Boundary/FeatureServer/0",
    },
    outputPredictionError: false,
    outputName: {
      serviceProperties: { name: "Interpolate points results" }, //Outputs results as a hosted feature layer.
    },

  };
  const jobReq = await Job.submitJob({
    url: operationUrl,
    params: params,
    authentication: auth,
  });

  // listen to the status event to get updates every time the job status is checked.
  jobReq.on(JOB_STATUSES.Status, jobInfo => {
    console.log(jobInfo.status)
  });

  // get all the results, this will start monitoring and trigger events
  const jobResp = await jobReq.getAllResults();

  console.log(jobResp);

Service requests

Request
HTTPHTTPcURL
Use dark colors for code blocksCopy
     
1
2
3
4
5
POST arcgis.com/sharing/rest/portals/self HTTP/1.1
Content-Type: application/x-www-form-urlencoded

&f=json
&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocksCopy
           
1
2
3
4
5
6
7
8
9
10
11
{
  "helperServices": {
    // Other parameters
    "analysis": {
      "url": "https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer"
    },
    "geoenrichment": {
      "url": "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer"
    }
  }
}

Predict fuel prices

This example uses the InterpolatePoints operation to predict fuel prices in Madrid.

In the analysis, the inputLayer value is the Gasolineras hosted feature layer and the Precio_gas is the field used to interpolate values.

Interpolation analysis showing fuel prices (95) for Madrid and surrounding areas.

APIs

ArcGIS REST JSArcGIS REST JSArcGIS API for Python
Expand
Use dark colors for code blocksCopy
                                                                                     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  const operationUrl = `${analysisUrl}/InterpolatePoints/submitJob`;

  const params = {

    inputLayer: {
      url:
        "https://services1.arcgis.com/nCKYwcSONQTkPA4K/arcgis/rest/services/Gasolineras_Pro/FeatureServer/0",
    },
    field: "Precio_gas",
    interpolateOption: 5,
    classificationType: "GeometricInterval",
    numClasses: 10,
    outputPredictionError: false,
    outputName: {
      serviceProperties: { name: "Interpolate points results" }, //Outputs results as a hosted feature layer.
    },
    context: {
      extent: {
        xmin: -438873.975499999,
        ymin: 4903874.0387,
        xmax: -375084.7903,
        ymax: 4945862.018,
        spatialReference: { wkid: 102100 },
      },
    },

  };
  const jobReq = await Job.submitJob({
    url: operationUrl,
    params: params,
    authentication: auth,
  });

  // listen to the status event to get updates every time the job status is checked.
  jobReq.on(JOB_STATUSES.Status, jobInfo => {
    console.log(jobInfo.status)
  });

  // get all the results, this will start monitoring and trigger events
  const jobResp = await jobReq.getAllResults();

  console.log(jobResp);

Service requests

Request
HTTPHTTPcURL
Use dark colors for code blocksCopy
     
1
2
3
4
5
POST arcgis.com/sharing/rest/portals/self HTTP/1.1
Content-Type: application/x-www-form-urlencoded

&f=json
&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocksCopy
           
1
2
3
4
5
6
7
8
9
10
11
{
  "helperServices": {
    // Other parameters
    "analysis": {
      "url": "https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer"
    },
    "geoenrichment": {
      "url": "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer"
    }
  }
}

Tutorials

Learn how to perform related analyses interactively with Map Viewer and programmatically with ArcGIS API for Python, ArcGIS REST JS, and ArcGIS REST API.

Services

Spatial analysis service

Process spatial datasets to discover relationships and patterns.

API support

Full supportPartial supportNo support
  • 1. Access with geoprocessing task
  • 2. Access via ArcGIS REST JS

Tools

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.