union接口

URL:

http:// <ProcessingServer-URL> / union

父资源:

ProcessingServer

[ 服务说明 ]

union接口,提供几何对象的并操作。

[ 参数说明 ]

参数 参数说明
geo1 参数作用:点,线,面等几何对象的geojson结构描述
参数说明:
            {
              "type": "LineString"|"Point"|"Polygon",
               "coordinates":[<geometry>]
            }
参数示例:
            {
              "type": "Polygon",
              "coordinates":[[[120.74213409424,45.7239086200985],[115.46869659424,41.2414867450985],[122.85150909424,42.8235179950985],[122.85150909424,42.8235179950985],[120.74213409424,45.7239086200985]]]
            }
geo2 参数作用:点,线,面等几何对象的geojson结构描述
参数说明:
            {
              "type": "LineString"|"Point"|"Polygon",
               "coordinates":[<geometry>]
            }
参数示例:
            {
              "type": "Polygon",
              "coordinates": [[[125.48822784424,43.1750804950985],[119.59955596924,43.6145336200985],[122.67572784424,40.0989086200985],[122.67572784424,40.0989086200985],[125.48822784424,43.1750804950985]]]
            }
format 参数作用:指定返回结果的格式
取值范围:html | json,该参数默认值为json
callback 参数作用:Ajax客户端使用JSONP方式进行跨域处理时所指定的回调函数名称
参数说明:可选参数,该参数仅在format参数值为json时有效

[ 示例 ]

URL地址示例:
http://127.0.0.1:8099/newmap/rest/services/utilities/Geometry/ProcessingServer/union?&geo1={"type":"Polygon","coordinates":[[[120.74213409424,45.7239086200985],[115.46869659424,41.2414867450985],[122.85150909424,42.8235179950985],[122.85150909424,42.8235179950985],[120.74213409424,45.7239086200985]]]}
&geo2={"type":"Polygon","coordinates":[[[125.48822784424,43.1750804950985],[119.59955596924,43.6145336200985],[122.67572784424,40.0989086200985],[122.67572784424,40.0989086200985],[125.48822784424,43.1750804950985]]]}

[ 返回结果 ]

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

{
    "type": "Polygon",
         "coordinates": [ [ [ 120.695876, 42.361597 ], [ 115.468697, 41.241487 ], [ 120.742134, 45.723909 ], [ 122.429836, 43.403319 ], [ 125.488228, 43.175080 ], [ 122.675728, 40.098909 ], [ 120.695876, 42.361597 ] ] ]
      }

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

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