# 地理坐标系转换 API 接口


地理坐标系转换 API 接口

提供地理信息坐标系的相互转换。

![gugudata_api_cover](https://static.gugudata.com/api_coordinate_converter.png)

# 1. 产品功能

- 支持多种地理信息坐标系；
- 高精度坐标系转换算法；
- 支持的地理坐标系：WGS84, GCJ02, BD09；
- 全接口支持 HTTPS（TLS v1.0 / v1.1 / v1.2 / v1.3）；
- 全面兼容 Apple ATS；
- 全国多节点 CDN 部署；
- 接口极速响应，多台服务器构建 API 接口负载均衡。

# 2. API 文档

**API 详情地址:** [https://www.gugudata.com/api/details/coordinateconverter](https://www.gugudata.com/api/details/coordinateconverter)

**接口请求地址:** [https://api.gugudata.com/location/coordinateconverter](https://api.gugudata.com/location/coordinateconverter)

**返回格式:** application/json; charset=utf-8

**请求方式:** GET

**请求协议:** HTTPS

**请求示例:** [https://api.gugudata.com/location/coordinateconverter?appkey=YOUR_APPKEY&from=YOUR_VALUE&to=YOUR_VALUE&value=YOUR_VALUE](https://api.gugudata.com/location/coordinateconverter?appkey=YOUR_APPKEY&from=YOUR_VALUE&to=YOUR_VALUE&value=YOUR_VALUE)

**接口测试:** [https://api.gugudata.com/location/coordinateconverter/demo](https://api.gugudata.com/location/coordinateconverter/demo)

# 3. 请求参数

| 参数名 | 参数类型 | 是否必须 |   默认值    |                     备注                     |
| :----: | :------: | :------: | :---------: | :------------------------------------------: |
| appkey |  string  |    是    | YOUR_APPKEY |             付费后获取的 APPKEY              |
|  from  |  string  |    是    | YOUR_VALUE  |  原数据的坐标系，可选值：WGS84, GCJ02, BD09  |
|   to   |  string  |    是    | YOUR_VALUE  | 目标数据的坐标系，可选值：WGS84, GCJ02, BD09 |
| value  |  string  |    是    | YOUR_VALUE  |   需要转换的坐标值，格式为：[120.54,32.74]   |

# 4. 返回参数

|             参数名              | 参数类型 |                 备注                 |
| :-----------------------------: | :------: | :----------------------------------: |
|      DataStatus.StatusCode      |   int    |            接口返回状态码            |
|  DataStatus.StatusDescription   |  string  |           接口返回状态说明           |
|   DataStatus.ResponseDateTime   |  string  |           接口数据返回时间           |
|    DataStatus.DataTotalCount    |   int    | 此条件下的总数据量，一般用于分页计算 |
|       Data.CoordinateFrom       |  string  |            原数据的坐标系            |
|        Data.CoordinateTo        |  string  |           目标数据的坐标系           |
|   Data.CoordinateSourceValue    |  string  |           需要转换的坐标值           |
| Data.CoordinateDestinationValue |  string  |            转换后的坐标值            |


