geometryMinDistanceResults


URI

<geometry_uri>/mindinstance[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

geometry

Child resources

geometryMinDistanceResult

Introduction

The geometryMinDistanceResults resource. The calculation of min distance is calculating the minimum distance between objects in the calculated recordset 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/geometry/mindistance

GET request

Returns 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
inputGeometries Geometry[] [Required]
The collection of calculated geometric objects. Currently, only 2D point objects are supported.
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/geometry/mindistance.rjson. The arguments are as follows:

{

    "inputGeometries":[{"type":"POINT", "id":1, "points":[{"x":23, "y":23}]}, {"type":"POINT", "id":2,     "points":[{"x":33, "y":37}]}],

    "referenceDatasetName":"Bounds@Interpolation",

    "createResultDataset":false,

    "minDistance":"0",

    "maxDistance":"-1"

}

The returned resource representation in rjson format is as follows:

{

    "succeed":true,

    "newResourceID":"mvrpzwln_f5a166e50b6a4400adb6f2e836b664b1",

    "postResultType":"CreateChild",

    "newResourceLocation":"http://localhost.:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/mindistance/mvrpzwln_f5a166e50b6a4400adb6f2e836b664b1"

}

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

See