project接口

URL:

http:// <ProcessingServer-URL> / project

父资源:

ProcessingServer

[ 服务说明 ]

Project接口提供对象的投影变换处理,接收点,线,面等几何对象,返回重投影后的对象。

[ 参数说明 ]

参数 参数说明
srsIn 参数作用:输入几何对象的投影信息
参数说明:使用国际惯用的EPSG代码指定,如EPSG:4326
srsOut 参数作用:指定输出投影信息
参数说明:使用国际惯用的EPSG代码指定,如EPSG:4326
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/project?srsin=EPSG:4326&srsout=EPSG:2437&geo={ "type": "LineString", "coordinates": [ [ 105.475843, 39.002044 ], [ 99.938734, 35.222747 ], [ 111.803968, 32.058685 ], [ 105.475843, 39.002044 ] ] }&format=json

[ 返回结果 ]

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

{
    "type":"LineString",
    "coordinates":[[ -760921.187682, 4420569.087851 ], [ -1338616.578238, 4089589.813031 ], [ -275190.600225, 3577965.965644 ], [ -760921.187682, 4420569.087851 ]]
}

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

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