simplify接口

URL:

http:// <ProcessingServer-URL> / simplify

父资源:

ProcessingServer

[ 服务说明 ]

simplify接口提供对几何对象按一定容差进行抽稀计算。

[ 参数说明 ]

参数 参数说明
tolerance 参数作用:指定容差值
参数说明:针对指定几何对象的抽稀程度
geo 参数作用:点,线,面等几何对象的geojson结构描述
参数说明:
            {
              "type": "LineString"|"Point"|"Polygon",
               "coordinates":[<geometry>]
            }
参数示例:
            {
              "type": "Polygon",
              "coordinates":[[[110.22193718749995,39.880950312500005],[99.76295281249995,35.837981562500005],[111.18873406249995,29.246184687500005],[110.22193718749995,39.880950312500005]]]
            }
format 参数作用:指定返回结果的格式
取值范围:html | json,该参数默认值为json
callback 参数作用:Ajax客户端使用JSONP方式进行跨域处理时所指定的回调函数名称
参数说明:可选参数,该参数仅在format参数值为json时有效

[ 示例 ]

URL地址示例:
http://127.0.0.1:8099/newmap/rest/services/utilities/Geometry/ProcessingServer/simplify?tolerance=10&geo= {"type":"Polygon","coordinates":[[[110.22193718749995,39.880950312500005],[99.76295281249995,35.837981562500005],[111.18873406249995,29.246184687500005],[110.22193718749995,39.880950312500005]]]} &format=json

[ 返回结果 ]

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

{
    "type":"Polygon",
    "coordinates": [ [ [ 110.221937, 39.880950 ], [ 111.188734, 29.246185 ], [ 99.762953, 35.837982 ], [ 110.221937, 39.880950 ] ] ]
}

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

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