mcp_geo_calculate_distance
Calculate the distance of a polyline across multiple coordinate systems. Input coordinates are converted to WGS84, then projected for planar distance calculation. Supports units in meters or kilometers.
Instructions
计算折线的距离。支持多种坐标系统输入,内部会先转换为WGS84坐标,再通过Web Mercator投影进行平面距离计算。适用于中小尺度的距离计算。
Input Schema
Name | Required | Description | Default |
---|---|---|---|
coordType | No | 输入坐标类型 | WGS84 |
coordinates | Yes | 折线坐标点数组,格式:[[lon1,lat1], [lon2,lat2],...] | |
unit | No | 长度单位:meters(米)或kilometers(千米) | meters |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"coordType": {
"default": "WGS84",
"description": "输入坐标类型",
"enum": [
"WGS84",
"GCJ02",
"BD09"
],
"type": "string"
},
"coordinates": {
"description": "折线坐标点数组,格式:[[lon1,lat1], [lon2,lat2],...]",
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"minItems": 2,
"type": "array"
},
"unit": {
"default": "meters",
"description": "长度单位:meters(米)或kilometers(千米)",
"enum": [
"meters",
"kilometers"
],
"type": "string"
}
},
"required": [
"coordinates"
],
"type": "object"
}