geometryBufferResults


URI

<geometry_uri>/buffer[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

geometry

Child resources

geometryBufferResult

Introduction

The result set for the buffer analysis on the geometry.

Supported methods

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

GIS Services Resource Hierarchy

HTTP request methods

Below is an example of performing an HTTP request on a specified URI with rjson as the output format. supermapiserver in the URI is the name of the server.

http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/buffer.rjson

GET Request

Gets a form for the POST request.

POST request

creates a buffer analysis result resource, equivalent to a buffer analysis on the geometry.

Request parameters

Parameters in the URI are as follows:

Field Type Definition
asynchronousReturn boolean Whether to adopt asynchronous operation. If true, the URI of the new resource will be immediately returned after the clients submit a request (i.e., the setting of returnContent is not effective); if false, the representation or the URI of the new resource will be returned according to the setting of returnContent once the analysis is finished on the server. The default value is false.
returnContent boolean Returns the description or the URI of the new resource. If true, returns the description for the analysis result. If false, returns the URI. The default is false.

Parameters in the request body are as follows:

Field Type Definition
sourceGeometry Geometry The source geometry with the projection coordinates used for buffer analysis.
PrjCoordSys must be built according to the structure of the field in PrjCoordSys, which also supports incoming coordinates in the way of only transferring epsgCode. When no parameters is being transferred, the default coordinate reference system is a plane coordinate system.
analystParameter BufferAnalystParameter The parameters used for buffer analysis.

Response structure

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

Name Type Description

succeed

boolean Whether query is successful.
newResourceID String ID of the new resource.
postResultType PostResultType

The type of the result from a POST request. Lists and describes the impact of a POST request on the target resource, i.e., the analysis result.

newResourceLocation String The URI of the newly created resource.

Example of response

Implement the POST request on http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/buffer.rjson and the parameters are as follows:

{

    

    "analystParameter": {

        "endType": "ROUND",

        "semicircleLineSegment": 4,

        "leftDistance": {

            "value": 100

        }

    },

    "sourceGeometry": {

        "type": "LINE",

        "prjCoordSys": {

            "epsgCode": 4326

        },

        "points": [{

            "x": 23,

            "y": 23

        },

        {

            "x": 33,

            "y": 37

        },

        {

            "x": 43,

            "y": 23

        }]

    }

}

The response in json format is as follows:

{

    "succeed": true,

    "newResourceID": "1",

    "postResultType": "CreateChild",

    "newResourceLocation": "http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/buffer/1"

}

Implementing the GET request on http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/buffer/1.rjson can return the result of the buffer analysis. Please see geometryBufferResult.

HEAD request

Retrieves the operations and output formats supported by the resource.

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.

The HEAD request helps check the existence of the geometryBufferResults resource and whether it can be accessed by the client. By implementing the HEAD request on the URI, with .<format> appended to the end, we can quickly get to know whether thegeometryBufferResults resource supports the representation in <format> or not.

See