{
"input": "40°26'46\"N 79°58'56\"W",
"detected": "dms",
"point": {
"lat": 40.446111111,
"lon": -79.982222222
},
"formats": {
"dd": {
"lat": 40.446111,
"lon": -79.982222,
"text": "40.446111, -79.982222"
},
"dms": {
"text": "40°26'46.0\"N 79°58'56.0\"W",
"lat": {
"degrees": 40,
"minutes": 26,
"seconds": 46,
"hemisphere": "N",
"text": "40°26'46.0\"N"
},
"lon": {
"degrees": 79,
"minutes": 58,
"seconds": 56,
"hemisphere": "W",
"text": "79°58'56.0\"W"
}
},
"utm": {
"system": "UTM",
"zone": 17,
"band": "T",
"hemisphere": "N",
"easting": 586309.934,
"northing": 4477770.44,
"text": "17T 586310 4477770",
"convergence": 0.660306288,
"scale": 0.999691696,
"standardZone": true
},
"mgrs": {
"text": "17TNE8630977770",
"spaced": "17T NE 86309 77770",
"gridZone": "17T",
"square": "NE",
"precision": 1
}
},
"warnings": [],
"datum": "WGS84",
"disclaimer": "WGS84 only (NAD83 differs from WGS84 by about 1-2 m in the US; no datum shifts). Not for navigation or safety-critical use without independent verification."
}
curl --location --request GET 'https://zylalabs.com/api/14589/coordinate+converter+utm+mgrs+api/37381/convert+a+coordinate+to+every+format?input=40°26'46"N 79°58'56"W&to=dd,dms,utm,mgrs&inputFormat=latlon&order=latlon&mgrsPrecision=1&pluscodeLength=10&geohashLength=9&maidenheadLength=6&ddDecimals=6&dmsDecimals=1&ddmDecimals=4' --header 'Authorization: Bearer YOUR_API_KEY'
{
"input": "fn31pr",
"valid": false,
"error": "invalid_coordinates",
"message": "Unexpected \"FN31PR\" in the coordinates."
}
curl --location --request GET 'https://zylalabs.com/api/14589/coordinate+converter+utm+mgrs+api/37382/check+a+coordinate+and+say+what+format+it+is?input=fn31pr&inputFormat=latlon&order=latlon' --header 'Authorization: Bearer YOUR_API_KEY'
{
"from": {
"input": "37°57'03.72030\"S 144°25'29.52440\"E",
"detected": "dms",
"point": {
"lat": -37.951033417,
"lon": 144.424867889
}
},
"to": {
"input": "37°39'10.15610\"S 143°55'35.38390\"E",
"detected": "dms",
"point": {
"lat": -37.652821139,
"lon": 143.926495528
}
},
"distance": {
"m": 54972.271,
"km": 54.972271,
"mi": 34.158186,
"nmi": 29.682652,
"ft": 180355.22
},
"initialBearing": {
"degrees": 306.868159,
"compass": "NW"
},
"finalBearing": {
"degrees": 307.173631,
"compass": "NW"
},
"midpoint": {
"lat": -37.802192702,
"lon": 144.175180764
},
"method": "karney",
"warnings": [],
"datum": "WGS84",
"disclaimer": "WGS84 only (NAD83 differs from WGS84 by about 1-2 m in the US; no datum shifts). Not for navigation or safety-critical use without independent verification."
}
curl --location --request GET 'https://zylalabs.com/api/14589/coordinate+converter+utm+mgrs+api/37383/distance+bearings+and+midpoint+between+two+points?from=37°57'03.72030"S 144°25'29.52440"E&to=37°39'10.15610"S 143°55'35.38390"E&method=karney&inputFormat=latlon&order=latlon' --header 'Authorization: Bearer YOUR_API_KEY'
{
"from": {
"input": "40.7128,-74.0060",
"detected": "dd",
"point": {
"lat": 40.7128,
"lon": -74.006
}
},
"bearing": 45,
"distance": {
"value": 10,
"unit": "km",
"m": 10000
},
"point": {
"lat": 40.776444847,
"lon": -73.922238254
},
"formats": {
"dd": {
"lat": 40.776445,
"lon": -73.922238,
"text": "40.776445, -73.922238"
},
"dms": {
"text": "40°46'35.2\"N 73°55'20.1\"W",
"lat": {
"degrees": 40,
"minutes": 46,
"seconds": 35.2,
"hemisphere": "N",
"text": "40°46'35.2\"N"
},
"lon": {
"degrees": 73,
"minutes": 55,
"seconds": 20.1,
"hemisphere": "W",
"text": "73°55'20.1\"W"
}
}
},
"finalBearing": {
"degrees": 45.05467,
"compass": "NE"
},
"warnings": [],
"datum": "WGS84",
"disclaimer": "WGS84 only (NAD83 differs from WGS84 by about 1-2 m in the US; no datum shifts). Not for navigation or safety-critical use without independent verification."
}
curl --location --request GET 'https://zylalabs.com/api/14589/coordinate+converter+utm+mgrs+api/37384/the+point+at+a+bearing+and+distance?from=40.7128,-74.0060&bearing=45&distance=10&unit=km&inputFormat=latlon&order=latlon' --header 'Authorization: Bearer YOUR_API_KEY'
{
"code": "9C3W9QCJ+2VX",
"ref": {
"lat": 51.3708675,
"lon": -1.217765625
},
"short": "CJ+2VX",
"shortened": true,
"point": {
"lat": 51.3701125,
"lon": -1.217765625
},
"note": "A short code only makes sense near the reference point (within about 25 km for 4 removed digits); show it with a town or city name."
}
curl --location --request GET 'https://zylalabs.com/api/14589/coordinate+converter+utm+mgrs+api/37385/shorten+a+plus+code+near+a+reference+point?code=9C3W9QCJ+2VX&ref=51.3708675,-1.217765625' --header 'Authorization: Bearer YOUR_API_KEY'
{
"code": "CJ+2VX",
"ref": {
"lat": 51.3708675,
"lon": -1.217765625
},
"fullCode": "9C3W9QCJ+2VX",
"point": {
"lat": 51.3701125,
"lon": -1.217765625
},
"cell": {
"southWest": {
"lat": 51.3701,
"lon": -1.21778125
},
"northEast": {
"lat": 51.370125,
"lon": -1.21775
}
}
}
curl --location --request GET 'https://zylalabs.com/api/14589/coordinate+converter+utm+mgrs+api/37386/recover+the+full+plus+code+from+a+short+one?code=CJ+2VX&ref=51.3708675,-1.217765625' --header 'Authorization: Bearer YOUR_API_KEY'
{
"datum": "WGS84",
"inputs": [
{
"id": "dd",
"name": "Decimal degrees",
"examples": [
"40.446111, -79.982222",
"40.446111N 79.982222W",
"lat=40.446111 lon=-79.982222",
"40,446111; -79,982222"
],
"notes": "Latitude first unless letters or labels say otherwise, or order=lonlat. Longitudes 180-360 are read as 0-360 style (with a warning)."
},
{
"id": "dms",
"name": "Degrees, minutes, seconds",
"examples": [
"40°26'46\"N 79°58'56\"W",
"40 26 46 N, 79 58 56 W",
"N 40 26 46 W 79 58 56",
"40d26m46sN 79d58m56sW",
"40:26:46N 79:58:56W"
],
"notes": "Typographic primes, º, \"deg/min/sec\" and the words north/south/east/west are understood."
},
{
"id": "ddm",
"name": "Degrees and decimal minutes",
"examples": [
"N40°26.767' W79°58.933'",
"40 26.767 -79 58.933"
],
"notes": "Common on GPS units and in geocaching."
},
{
"id": "utm",
"name": "Universal Transverse Mercator",
"examples": [
"17T 586310 4477770",
"17N 586310 4477770",
"56 south 334786 6252080"
],
"notes": "Zone 1-60 then the latitude band (C-X) or the hemisphere. \"S\" alone is read as band S (32°N-40°N) when the numbers fit it (a warning says so). Norway (32V) and Svalbard (31X-37X) zone exceptions; use utmZone to force a zone. 80°S to 84°N; UPS beyond."
},
{
"id": "ups",
"name": "Universal Polar Stereographic",
"examples": [
"UPS N 2001928 1989066"
],
"notes": "North of 84°N and south of 80°S."
},
{
"id": "mgrs",
"name": "Military Grid Reference System (and USNG)",
"examples": [
"18SUJ2348706483",
"18S UJ 23487 06483",
"18SUJ2306",
"ZAG0192789066"
],
"notes": "Precision 1 m (10 digits) to 100 km (0 digits). Digits are truncated as NGA specifies; read back, a reference gives its square's center and corners. Polar zones A, B, Y, Z. USNG is MGRS written with spaces (\"spaced\")."
},
{
"id": "pluscode",
"name": "Open Location Code (plus code)",
"examples": [
"87G2C2W9+C4",
"C2W9+C4 with ref=40.4,-79.9"
],
"notes": "Full codes of 2-15 digits; short codes need ref=lat,lon (no geocoding of place names). Read back, a code gives its area's center."
},
{
"id": "geohash",
"name": "Geohash",
"examples": [
"dppn5fyxx",
"u4pruydqqvj"
],
"notes": "1-12 characters. A string that is only digits is not taken as a geohash unless inputFormat=geohash."
},
{
"id": "maidenhead",
"name": "Maidenhead locator (amateur radio)",
"examples": [
"FN31pr",
"FN31pr21",
"JO62"
],
"notes": "2, 4, 6 or 8 characters. \"FN31pr\" is also a valid geohash; Maidenhead wins unless inputFormat=geohash."
}
],
"outputs": [
"dd",
"dms",
"ddm",
"utm",
"mgrs",
"pluscode",
"geohash",
"maidenhead"
],
"notes": [
"Auto-detection order: plus code, MGRS, UTM, UPS, Maidenhead, geohash, latitude/longitude text. Pass inputFormat to force one.",
"what3words is not supported (proprietary).",
"WGS84 only (NAD83 differs from WGS84 by about 1-2 m in the US; no datum shifts). Not for navigation or safety-critical use without independent verification."
]
}
curl --location --request GET 'https://zylalabs.com/api/14589/coordinate+converter+utm+mgrs+api/37387/supported+formats+with+examples' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 坐标转换器 UTM MGRS API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
在十进制度、度分秒、UTM、MGRS、plus codes 和 geohash 之间转换坐标;验证输入并测量距离和目的地点
每个端点返回各种类型的地理空间数据,包括以多种格式(例如,十进制度,DMS,UTM)转换的坐标,距离测量,方位角和中点计算。例如,距离端点提供以米,公里和英里为单位的距离,以及初始和最终方位角
关键字段包括“输入”(原始坐标)、“检测”(格式类型)、“点”(纬度和经度)、“距离”(各种单位)和“格式”(转换输出)例如,距离终点包括以米为单位的距离和方位的字段
参数因端点而异 对于转换端点 可以使用“input”来表示任何坐标格式或使用“lat”和“lon”来表示特定坐标 距离端点接受两个坐标输入和一个方法参数以选择计算方法
响应数据以JSON格式结构化,嵌套对象以便于清晰。例如,距离端点将数据组织为输入坐标的“from”和“to”部分,后面跟着“distance”、“initialBearing”和“midpoint”部分,便于解析
支持的格式包括十进制度(dd)、度分秒(dms)、UTM、MGRS、plus codes和geohash。“GET /formats”端点提供了每种格式的详细示例和说明,帮助用户理解如何输入和解释数据
典型的用例包括为地图应用转换坐标 计算物流的距离 和确定旅行计划的中点 用户还可以验证坐标并在不同系统之间转换格式以确保兼容性
用户可以通过提取与其需求相关的特定字段来利用返回的数据。例如,从距离端点,用户可以直接获取他们首选单位的距离和导航的方位。结构化格式易于集成到应用程序中
数据准确性通过使用基于WGS84基准的已有大地测量计算来维持 API采用卡尼和文森提的方法进行距离计算,确保结果可靠 此外,输入验证检查有助于防止坐标格式中的错误