datasetMinDistanceResults


URI

<dataset_uri>/mindistance[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

dataset

Child resources

datasetMinDistanceResult

Introduction

The datasetMinDistanceResult resource. The calculation of min distance is calculating the minimum distance between features in the calculated dataset to features within the query bounds of the reference dataset. Currently, only 2D point dataset is supported for calculated dataset. The reference dataset can be 2D point, line, region or 2D network dataset.

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/mindistance.rjson

GET request

Gets a form for the POST request.

POST request

The minimum distance will be calculated through implementing the POST request on the resource with arguments specified.

Request parameter

The following parameters are needed in the request body

Name Type Description
inputFilterQueryParameter  QueryParameter [Optional]
The filter condition used to filter the features in the calculated dataset. Only features satisfying the condition can participate the calculation.
referenceDatasetName String [Required]
Te name of the reference dataset. The dataset can be a 2D point, line, region dataset or a 2D network dataset.
referenceFilterQueryParameter QueryParameter [Optional]
The filter condition used to filter the features in the reference dataset. If not set, all features in the reference dataset will participate the calculation.
createResultDataset boolean Whether to create the result dataset.
resultDatasetName String The name of the result dataset.
resultDatasourceName String The name of the datasource holding the result dataset.
minDistance double [Required]
The min distance for the specified query bounds. The value should be equal to or greater than 0. The unit is identical to that of the dataset to which the calculated recordset belongs.
maxDistance double [Required]
The max distance for the specified query bounds. The value should be -1 or greater than 0. -1 indicates there is no limit for max distance. The unit is identical to that of the dataset to which the calculated recordset belongs.

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 fo the POST request.
newResourceLocation String The URI of the newly created resource.

 

Response example

Implement the POST request on the mindistance resource: http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/mindistance.rjson. The arguments are as follows:

{

    "referenceDatasetName":"Bounds@Interpolation",

    "createResultDataset":true,

    "minDistance":"0",

    "maxDistance":"-1",

    "resultDatasetName":"minDistanceBounds",

    "resultDatasourceName":"Interpolation"

}

The returned resource representation in rjson format is as follows:

{

    "succeed":true,

    "newResourceID":"mvrpzwln_e6b1f1cbcd5a49faa580349a741bca92",

    "postResultType":"CreateChild",

    "newResourceLocation":"http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/mindistance/mvrpzwln_e6b1f1cbcd5a49faa580349a741bca92"

}

The specific information about calculating the min distance will be acquired through implementing the GET request on http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/SamplesP@Interpolation/mindistance/mvrpzwln_e6b1f1cbcd5a49faa580349a741bca92. See datasetMinDistanceResult.

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

See