URI
<geometry_uri>/buffer[.<format>]
Supported methods
Parent resource
Child resources
Introduction
对几何对象进行缓冲区分析的结果集资源。
Supported methods:
- GET:html表述返回一个进行 POST 请求的表单,其他表述返回缓冲区分析的结果集列表。
- POST:Creates a对象缓冲区分析结果资源,相当于进行了一次对象缓冲区分析。
- HEAD:检查 geometryBufferResults resource exists, or if there is permission to access geometryBufferResults 资源。
Supported output formats:RJSON、JSON、HTML、XML。
GIS Services Resource Hierarchy
HTTP Request Methods
对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。
http://supermapiserver:8090/iserver/services/geometry/restjsr/v1/geometry/buffer.rjson
GET 请求
html表述返回一个进行 POST 请求的表单,其他表述返回缓冲区分析的结果集列表。
POST 请求
Request parameters
Creates a几何对象的缓冲区分析结果资源,相当于进行了一次对象缓冲区分析。
Parameters in the URI are as follows:
| 名称 | 类型 | 含义 |
| asynchronousReturn | boolean | 是否采用异步操作。如果为 true,则在客户端提交请求后会立即返回新资源的 URI(即 returnContent 的设置不起作用); 为 false,则服务端在分析完成后根据 returnContent 的设置返回新资源的表述或者新资源的 URI。默认为 false。 |
| returnContent | boolean | 是否立即返回新创建资源的表述还是返回新资源的 URI。如果为 true,则直接返回新创建资源,即分析结果的表述。为 false,则返回的是分析结果资源的 URI。默认为 false。 |
请求体中的参数如下:
| 名称 | 类型 | 含义 |
| sourceGeometry | GeometryWithPrjCoordSys | 用来进行缓存区分析的带有投影坐标系的几何要素。 参数使用时,投影坐标参数 PrjCoordSys 需按照PrjCoordSys中的字段结构来构建,同时也支持通过只传递 epsgCode 的方式传入坐标参考系。不传递 PrjCoordSys 参数时,几何要素的坐标参考系默认为平面坐标系。 |
| analystParameter | BufferAnalystParameter | 缓冲区分析参数。 |
Response structure
Normal response code(s): 201. The response parameters are as follows:
| 字段 | 类型 | 说明 |
succeed |
boolean | 查询是否成功。 |
| newResourceID | String | 分析结果资源的 ID。 |
| postResultType | PostResultType | POST 请求的结果类型,枚举说明 POST 请求对目标资源的影响,即处理结果是什么样的。 |
| newResourceLocation | String | 创建的新资源的 URI。 |
Example of response
对 geometryBufferResults 资源:http://supermapiserver:8090/iserver/services/geometry/restjsr/v1/geometry/buffer.rjson,执行 POST 请求,参数如下:
{"analystParameter":{"endType":"ROUND", "semicircleLineSegment":4, "leftDistance":{"value":100}, "rightDistance":{"value":100}}, "sourceGeometry":{"type":"LINE", "points":[{"x":23, "y":23}, {"x":33, "y":37}, {"x":43, "y":23}]}}
则返回的 r json 格式的资源描述如下:
{
"postResultType": "CreateChild",
"newResourceID": "dd8d74a331474fd0957086f7d680efd5_6699f19d014a41d3ac6bb4c9463553ca",
"succeed": true,
"newResourceLocation": "http://localhost:8090/iserver/services/geometry/restjsr/v1/geometry/buffer/dd8d74a331474fd0957086f7d680efd5_6699f19d014a41d3ac6bb4c9463553ca"
}
HEAD 请求
Returns the same HTTP response headers as a GET request, but without the response body. This allows retrieving meta-information from the response headers without transporting the entire content. The meta-information includes the media type,字符编码,压缩编码,实体内容长度等。
A HEAD request can be used to check if geometryBufferResults 资源是否存在,或者客户端是否有权限访问 geometryBufferResults 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 geometryBufferResults 资源是否支持<format>格式的表述。
See
- geometry,geometryBufferResult
- 客户端构建 REST 请求
- Status Codes
- SuperMap iServer REST API 表述格式介绍
- GIS Services Resource Hierarchy