# Generated by ShowAPI OpenAPI generator
# source: market/1252
# generated-at: 2026-06-26T06:00:00.192Z
openapi: 3.0.3
info:
  title: 坐标系经纬度转换
  description: 【一款专业的坐标系转换工具】支持WGS84、GCJ02（火星坐标系）和BD09（百度坐标系）之间的相互转换。通过我们的服务，用户可以轻松准确地将全球定位系统（GPS）的经纬度数据转换为中国大陆适用的加密坐标，或进一步转换为百度地图所使用的坐标系。广泛应用于地理信息、导航和定位等领域场景的需求。
  termsOfService: https://www.showapi.com/helpcenter/view#/4019/2
  version: 1.0.0
servers:
  - url: https://route.showapi.com
paths:
  /1252-2:
    x-pointCode: 2
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: 两点直线距离
      description: 根据两个经纬度坐标，返回其直线距离。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          distance:
                            type: string
                            description: 两点间的直线距离，单位米。
                        description: 业务返回体
      operationId: 1252_2_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                from:
                  type: string
                  description: 开始点的经纬度坐标，经度纬度值用逗号。分隔
                to:
                  type: string
                  description: 结束点的经纬度坐标，经度纬度值用逗号分隔。
              required:
                - from
                - to
  /1252-1:
    x-pointCode: 1
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: 坐标系转换
      description: |-
        GCJ02：腾讯、高德、51
        WGS84：手机GPS设备、Google
        BD09：百度
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          from:
                            type: string
                            description: 源坐标系名称
                          to:
                            type: string
                            description: 目标坐标系名称
                          resultList:
                            type: array
                            items:
                              type: object
                              properties:
                                input:
                                  type: string
                                  description: 输入的一个点结构，数组，下标0为经度，下标1为纬度
                                output:
                                  type: string
                                  description: 转换后的点结构，数组，下标0为经度，下标1为纬度
                            description: 转换后的结果
                          ret_code:
                            type: number
                            description: 业务成功标识
                        description: 业务返回体
      operationId: 1252_1_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                from:
                  type: string
                  description: 可选值WGS84、GCJ02、BD09
                to:
                  type: string
                  description: 可选值WGS84、GCJ02、BD09
                location:
                  type: string
                  description: from的位置参数，经度范围为-180到180，纬度范围为-90到90，经度在前，纬度在后。 经纬度用逗号分隔，多个经纬点用分号;隔开。可最多转换20个数据点。
              required:
                - from
                - to
                - location
components:
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: appKey
      description: 从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp
  schemas:
    ShowapiResEnvelope:
      type: object
      description: ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）
      properties:
        showapi_res_code:
          type: integer
          description: API 返回的状态码
        showapi_res_error:
          type: string
          description: API 返回的错误信息
        showapi_res_id:
          type: string
          description: API 请求的唯一标识
        showapi_fee_num:
          type: integer
          description: API 调用计费次数
security:
  - AppKeyAuth: []
externalDocs:
  url: https://www.showapi.com/apiGateway/view/1252?tab=book
x-apiCode: "1252"
x-is-own: false
x-is-op: true
