buffer接口

URL:

http:// <ProcessingServer-URL> / buffer

父资源:

ProcessingServer

[ 服务说明 ]

buffer接口提供计算对象缓冲区的功能,接收点,线,面等几何对象,返回缓冲分析后的对象。

[ 参数说明 ]

参数 参数说明
r 参数作用:指定缓冲半径的大小
geo 参数作用:线,面等几何对象的geojson结构描述
参数说明:
            {
              "type": "LineString"|"Point"|"Polygon",
               "coordinates":[<geometry>]
            }
参数示例:
            {
              "type": "LineString",
              "coordinates": [ [ 105.475843, 39.002044 ], [ 99.938734, 35.222747 ], [ 111.803968, 32.058685 ], [ 105.475843, 39.002044 ] ]
            }
format 参数作用:指定返回结果的格式
取值范围:html | json,该参数默认值为json
callback 参数作用:Ajax客户端使用JSONP方式进行跨域处理时所指定的回调函数名称
参数说明:可选参数,该参数仅在format参数值为json时有效

[ 示例 ]

URL地址示例:
http://127.0.0.1:8099/newmap/rest/services/utilities/Geometry/ProcessingServer/buffer?r=10&geo={ "type": "LineString", "coordinates": [ [ 105.475843, 39.002044 ], [ 99.938734, 35.222747 ], [ 111.803968, 32.058685 ], [ 105.475843, 39.002044 ] ] }&format=json

[ 返回结果 ]

    buffer操作成功时的返回结果示例 :

{
    "type":"Polygon",
    "coordinates":[ [ [ 99.909505, 47.307389 ], [ 99.978935, 47.355726 ], [ 100.129470, 47.449228 ], [ 100.278402, 47.545264 ], [ 100.351802, 47.587326 ], [ 100.423666, 47.631963 ], [ 100.578888, 47.717459 ], [ 100.732642, 47.805569 ], [ 100.808143, 47.843732 ], [ 100.882245, 47.884547 ], [ 101.041729, 47.961802 ], [ 101.199883, 48.041744 ], [ 101.277278, 48.075903 ], [ 101.353414, 48.112784 ], [ 101.516723, 48.181586 ], [ 101.678845, 48.253141 ]]]
}

    buffer操作失败时的返回结果示例 :

{
    "error":"无法解析传入的Geometry"
}