intersection接口

URL:

http:// <ProcessingServer-URL> / intersection

父资源:

ProcessingServer

[ 服务说明 ]

intersection接口,提供几何对象的相交操作,如线对象与面对象相交计算,面对象与面对象相交计算。

[ 参数说明 ]

参数 参数说明
geo1 参数作用:点,线,面等几何对象的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]]]
            }
geo2 参数作用:点,线,面等几何对象的geojson结构描述
参数说明:
            {
              "type": "LineString"|"Point"|"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/intersection?
&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]]]}

[ 返回结果 ]

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

{
    "type":"Polygon",
    "coordinates": [ [ [ 99.935851, 35.904816 ], [ 109.534986, 39.615406 ], [ 110.315441, 38.852409 ], [ 110.920701, 32.194551 ], [ 99.913808, 35.750950 ], [ 99.794658, 35.819690 ], [ 99.935851, 35.904816 ] ] ]
}

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

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