symdifference接口
URL: |
http:// <ProcessingServer-URL> /symdifference |
父资源: |
ProcessingServer |
[ 服务说明 ]
symdifference接口,提供面几何对象对称差操作。
[ 参数说明 ]
参数 | 参数说明 |
---|---|
geo1 |
参数作用:点,线,面等几何对象的geojson结构描述 参数说明: { "type":"Polygon", "coordinates":[<geometry>] } 参数示例: { "type": "Polygon", "coordinates":[[[110.22193718749995,39.880950312500005],[99.76295281249995,35.837981562500005],[111.18873406249995,29.246184687500005],[110.22193718749995,39.880950312500005]]] } |
geo2 |
参数作用:点,线,面等几何对象的geojson结构描述 参数说明: { "type": "Polygon", "coordinates":[<geometry>] } 参数示例: { "type": "Polygon", "coordinates":[[[108.221,40.9],[99.762,35.8],[120.1887,29.2],[108.221,40.9]]] } |
format |
参数作用:指定返回结果的格式 取值范围:html | json,该参数默认值为json |
callback |
参数作用:Ajax客户端使用JSONP方式进行跨域处理时所指定的回调函数名称 参数说明:可选参数,该参数仅在format参数值为json时有效 |
[ 示例 ]
URL地址示例:
http://127.0.0.1:8099/newmap/rest/services/utilities/Geometry/ProcessingServer/symdifference?
&geo1={"type":"Polygon","coordinates":[[[110.22193718749995,39.880950312500005],[99.76295281249995,35.837981562500005],[111.18873406249995,29.246184687500005],[110.22193718749995,39.880950312500005]]]}
&geo2={"type":"Polygon","coordinates":[[[108.221,40.9],[99.762,35.8],[120.1887,29.2],[108.221,40.9]]]}
[ 返回结果 ]
symdifference操作成功时的返回结果示例 :
{
"type":"MultiPolygon",
"coordinates": [ [ [ [ 99.935851, 35.904816 ], [ 108.221000, 40.900000 ], [ 109.534986, 39.615406 ], [ 99.935851, 35.904816 ] ] ], [ [ [ 99.935851, 35.904816 ], [ 99.794658, 35.819690 ], [ 99.762953, 35.837982 ], [ 99.935851, 35.904816 ] ] ], [ [ [ 99.913808, 35.750950 ], [ 99.762000, 35.800000 ], [ 99.794658, 35.819690 ], [ 99.913808, 35.750950 ] ] ], [ [ [ 99.913808, 35.750950 ], [ 110.920701, 32.194551 ], [ 111.188734, 29.246185 ], [ 99.913808, 35.750950 ] ] ], [ [ [ 110.315441, 38.852409 ], [ 120.188700, 29.200000 ], [ 110.920701, 32.194551 ], [ 110.315441, 38.852409 ] ] ], [ [ [ 110.315441, 38.852409 ], [ 109.534986, 39.615406 ], [ 110.221937, 39.880950 ], [ 110.315441, 38.852409 ] ] ] ]
}
"type":"MultiPolygon",
"coordinates": [ [ [ [ 99.935851, 35.904816 ], [ 108.221000, 40.900000 ], [ 109.534986, 39.615406 ], [ 99.935851, 35.904816 ] ] ], [ [ [ 99.935851, 35.904816 ], [ 99.794658, 35.819690 ], [ 99.762953, 35.837982 ], [ 99.935851, 35.904816 ] ] ], [ [ [ 99.913808, 35.750950 ], [ 99.762000, 35.800000 ], [ 99.794658, 35.819690 ], [ 99.913808, 35.750950 ] ] ], [ [ [ 99.913808, 35.750950 ], [ 110.920701, 32.194551 ], [ 111.188734, 29.246185 ], [ 99.913808, 35.750950 ] ] ], [ [ [ 110.315441, 38.852409 ], [ 120.188700, 29.200000 ], [ 110.920701, 32.194551 ], [ 110.315441, 38.852409 ] ] ], [ [ [ 110.315441, 38.852409 ], [ 109.534986, 39.615406 ], [ 110.221937, 39.880950 ], [ 110.315441, 38.852409 ] ] ] ]
}
symdifference操作失败时的返回结果示例 :
{
"error":"无法解析传入的geo1"
}
"error":"无法解析传入的geo1"
}