kernelDensity


URI

<datasetDensityAnalyst_uri>/kernel[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

datasetDensityAnalyst

Child resources

kernelDensityResult

Introduction

The kernel density analysis result resource. Sending a POST request for this resource can create a result resource of kernel density.

Kernel density analysis, namely, use the kernel function to calculate the every unit area value in point or line scope of neighborhood. The result is smooth surface with big median and small surrounding. It reduced to zero at the neighborhood boundaries.

For the point object, the space volume combined by kernel surface and bottom plane is similar with the product of line measurement and line length. The neighborhood overlay of point or line has the same density. Every density of output is the sum of curved surface value overlayed in raster.

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.

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

GET request

Gets a form for the POST request.

POST request

Execute a kernel density analysis. Namely, create a kernel density analysis result resource.

Request parameter

Parameters passed in the request body are as follows:

Name Type Description
bounds Rectangle2D Density analysis area, used to confirm the results of raster dataset extent. Default as the current dataset extent.
resultGridDatasetResolution double Density analysis result resolution of raster data, unit as same as current dataset. default value as current dataset's minimum value of length and width divide 500.
searchRadius double Raster neighbor range used to calculate density search radius, unit as current dataset. default value as current dataset's minimum value of length and width divide 30.
fieldName String [Required]
Name field used to process density analysis measure value. Density analysis do not support text type field.
targetDatasource String Set datasource of stored results dataset, default as datasource of current analysis dataset .
resultGridName String The specified result dataset.
deleteExistResultDataset boolean Whether to overlay the existing dataset with the same name.

Response structure

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

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

Response example

Implement the POST request on the kernelDensity resource http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/densityanalyst/kernel.rjson. The returned rjson is as follows:

{

    "resultGridDatasetResolution": 3000,

    "searchRadius": 2000,

    "fieldName": "AVG_TMP",

    "targetDatasource": "Interpolation",

    "resultGridName": "test",

    "deleteExistResultDataset": true

}

The response result in rjson format returned is as follows:

{

    "succeed": true,

    "newResourceID": "6b7fe42a934c49fa93fe5b8b7541d2db_568ab41863944b739a73aae99fac5bfd",

    "postResultType": "CreateChild",

    "newResourceLocation": "http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/densityanalyst/kernel/6b7fe42a934c49fa93fe5b8b7541d2db_568ab41863944b739a73aae99fac5bfd"

}

The returned child resource is http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/densityanalyst/kernel/6b7fe42a934c49fa93fe5b8b7541d2db_568ab41863944b739a73aae99fac5bfd, which contains the result dataset of kernel density analysis.

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 kernelDensity resource exists, or if the kernelDensity resource can be accessed by clients. It can also determine if the kernelDensity resource supports an output format <format> if performed on a URI with .<format> included.

See