URI
<geometry_uri>/thiessenpolygon[.<format>]
Supported methods
Parent resouce
Child resources
Introduction
Create Thiessen polygon based on point array.
Supported Methods:
- GET: Return a form for the POST request.
- POST: Return the thiessen polygon result resource created.
- HEAD: Check if the geometryThiessenPolygonResults resource exists, or if there is permission to access the geometryThiessenPolygonResults resource.
Supported output formats: rjson, json, html, xml.
GIS Services Resource Hierarchy
HTTP request methods
Perform 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/thiessenpolygon.rjson
GET request
Gets a form for the POST request.
POST request
Return the result resource of the Thiessen polygon created.
Request parameter
Name | Type | Description |
points | Point2D[] | The geometry object used when performing analysis with point array. |
clipRegion | Geometry | The clip area for the result data can be null, meaning no clipping will be conducted to the result. |
createResultDataset | boolean | Whether to return the result dataset, don't return by default |
resultDatasetName | String | Specify the name of the result dataset. |
resultDatasourceName | String | Specify the data source that contains the result dataset, the default is the current datasource. |
returnResultRegion | boolean | Whether to return the polygon region array get by analysis, the default is return. |
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. |
Respose example
Perform POST request on the http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/thiessenpolygon.rjson, the request body in rjson format is as the following:
{
"usePoints": false,
"points": [{
"y": 33.173365394332386,
"x": 98.01763839650486
},
{
"y": 45.929526570323986,
"x": 10.1903868382616
},
{
"y": 34.64343254047105,
"x": 15.129150755768138
},
{
"y": 62.09158448581845,
"x": 87.3898730056924
},
{
"y": 54.93740505446476,
"x": 10.900651499852987
},
{
"y": 50.50252956794513,
"x": 20.505418251361472
}],
"clipRegion": {
"center": {
"y": 50,
"x": 50
},
"id": 0,
"style": null,
"parts": [5],
"points": [{
"y": 0,
"x": 0
},
{
"y": 0,
"x": 100
},
{
"y": 100,
"x": 100
},
{
"y": 100,
"x": 0
},
{
"y": 0,
"x": 0
}],
"type": "REGION"
},
"createResultDataset": false,
"returnResultRegion": true
}
The result in rjson format returned is as follows:
{
"succeed": true,
"newResourceID": "n8zmmavh_36ccd0a04b3b40399a0627ee0fb6ff0f",
"postResultType": "CreateChild",
"newResourceLocation": "http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/thiessenpolygon/n8zmmavh_36ccd0a04b3b40399a0627ee0fb6ff0f"
}
Performing a GET request on http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/thiessenpolygon/n8zmmavh_36ccd0a04b3b40399a0627ee0fb6ff0f can retrieve detailed information about the analysis result. Please see datasetIsoregionResult.
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 geometryThiessenPolygonResults resource exists, or if the resource can be accessed by clients. It can also determine if the geometryThiessenPolygonResults resource supports an output format <format> if performing on a URI with .<format> included.