interpolationIDW


URI

<datasetInterpolation_uri>/idw[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

datasetInterpolation

Child resources

interpolationIDWResult

Introduction

Inverse Distance Weighted algorithm, estimate a cell value by calculating the average value of its neighbouring cells and create raster dataset. This is a simple but effective data interpolation method, the operation is fast. The closer a point to the current point the greater the effect, the weight has an inverse relationship with distance.

You can create a inverse distance weighted interpolation analysis result resource by sending POST request to the resource.

Supported Methods:

Supported output formats:rjson、json、jsonp、html、xml.

GIS Services Resource Hierarchy

http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/interpolation/idw.rjson

GET request

Inverse distance weighted interpolation resource.

Gets a form for the POST request.

POST request

Creates the resource of an inverse distance weighted interpolatio analysis result, i.e., performs an interpolation analysis.

Request parameter

When perform the POST request, the request body should contain the following parameters:

Name Type Description
power int The power of the distance weight, this value decide the decrease speed of the weight value, the greater the power, the faster the decreasing.
Theoretically, the parameter value must be larger than 0, the recommended value range is 0.5~3, the default value is 2.
bounds Rectangle2D The extent of the interpolation analysis, used to determine the extent of the result raster dataset. It's the extent of the original dataset by default.
Since it is the method of interpolation, only the result inside the original dataset is meaningful, so it is recommended that this parameter should not larger than the original dataset extent.
searchMode SearchMode When performing interpolation operation, the mode to search the point used in the operation, fixed point number search and fixed distance query are supported.
expectedCount int [Fixed point number search]
Set the number of points to query, the default is 12.
searchRadius double [Fixed distance search]
Search radius, the search extent used in the operation, the unit is the same with the point dataset. When calculate the Z value of a location, use the location as the center, the search extent as the radius, all the points in the circle with be used in the operation.
zValueFieldName String The name of fields that used to perform interpolation analysis, text field is not supported.
zValueScale double The scale used in the interpolation analysis, the default is 1.
The values used in the interpolation analysis is multiplied by this value.
resolution double The resolution of the interpolation result raster dataset, that is the actual distance represented by a pixel, the unit is the same with the point dataset. The value can't be larger than the side of the dataset extent to analysis.
When setting this value, it is needed to consider the size of the point dataset.
filterQueryParameter   the filtering condition used to filter points in the dataset. Only points that meet the filtering condition will be included in the analysis.
outputDatasetName String The name of the interpolation analysis result dataset.
outputDatasourceName String The name of the interpolation analysis result datasource.
pixelFormat PixelFormat Specify the pixel format of the result raster dataset,it can be: BIT8, BIT16, BIT32, DOUBLE, SINGLE, UBIT1, UBIT4, UBIT8, UBIT16, or UBIT32.
clipParam ClipParameter The parameter used to clip the interpolation results.

Response structure

Normal response code(s): 201. The response parameters are as follows:

Field Type Description
succeed Boolean Whether the query is successful.
newResourceID String The ID for the analysis result resource.
postResultType   The result type fo the POST request.
newResourceLocation String The URI of the newly created resource.

Respose example

Perform POST request on interpolationIDW resource, that is submit request body to http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/interpolation/idw.rjson, as shown below:

{

    "power": 2,

    "searchMode": "KDTREE_FIXED_COUNT",

    "expectedCount": 12,

    "pixelFormat": "BIT16",

    "zValueFieldName": "AVG_TMP",

    "resolution": 3000,

    "filterQueryParameter": {

        "attributeFilter": ""

    },

    "outputDatasetName": "test",

    "outputDatasourceName":"Interpolation"

}

The response information in rjson format returned is as follows:

{

    "succeed": true,

    "newResourceID": "mi92arb7_ced19c5194e54209bd9112871f34f7c9",

    "postResultType": "CreateChild",

    "newResourceLocation": "http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/interpolation/idw/mi92arb7_ced19c5194e54209bd9112871f34f7c9"

}

Performing a GET request on http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/interpolation/idw/mi92arb7_ced19c5194e54209bd9112871f34f7c9.rjson can retrieve detailed information about the inverse distance weighted interpolation analysis result. Please see interpolationIDWResult.

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the interpolationIDW resource exists, or if the resource can be accessed by clients. It can also determine if the interpolationIDW resource supports an output format <format> if performed on a URI with .<format> included.

See