DE
API & MCPDokumentation

Mariner GPS Tools Agenten- & API-Plattform

Koordinaten einlesen und formatieren

Zwischen Dezimalgrad und Grad, Minuten, Sekunden (DMS) umrechnen.

Schnittstellen

POST
REST-Endpunkt/api/v1/coordinates/convert
MCP
Werkzeugnameconvert_coordinates

Anfrage

Senden Sie die Anfrage als JSON. MCP-Clients übergeben dieselben Felder als Toolargumente.

cURLshell
curl -X POST https://marinergps.tools/api/v1/coordinates/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "latitude": "51.5074",
  "longitude": "-0.1278",
  "format": "dms"
}'
Anforderungstextjson
{
  "latitude": "51.5074",
  "longitude": "-0.1278",
  "format": "dms"
}

Antwort

REST verpackt das Berechnungsergebnis in den Standard-Erfolgsumschlag. MCP gibt dieselben Berechnungsdaten als strukturierte Werkzeugausgabe zurück.

JSON
{
  "ok": true,
  "data": {
    "latitude": {
      "decimal": 51.5074,
      "formatted": "51° 30′ 26.640″ N"
    },
    "longitude": {
      "decimal": -0.1278,
      "formatted": "0° 07′ 40.080″ W"
    },
    "format": "dms"
  }
}

Schemata

Die folgenden Definitionen zeigen das vollständige JSON-Schema, das zur Validierung von Eingaben und zur Beschreibung von Ausgaben verwendet wird.

Eingabeschema

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "latitude": {
      "type": "string",
      "description": "Latitude as signed decimal degrees, decimal degrees with N/S (33.8688° S), degrees and decimal minutes, or DMS. Do not combine a sign with a hemisphere letter."
    },
    "longitude": {
      "type": "string",
      "description": "Longitude as signed decimal degrees, decimal degrees with E/W (4.15° W), degrees and decimal minutes, or DMS. Do not combine a sign with a hemisphere letter."
    },
    "format": {
      "type": "string",
      "enum": [
        "decimal",
        "dms"
      ],
      "description": "Output coordinate format."
    }
  },
  "required": [
    "latitude",
    "longitude",
    "format"
  ]
}

Ausgabeschema

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "latitude": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decimal": {
          "type": "number"
        },
        "formatted": {
          "type": "string"
        }
      },
      "required": [
        "decimal",
        "formatted"
      ]
    },
    "longitude": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decimal": {
          "type": "number"
        },
        "formatted": {
          "type": "string"
        }
      },
      "required": [
        "decimal",
        "formatted"
      ]
    },
    "format": {
      "type": "string",
      "enum": [
        "decimal",
        "dms"
      ]
    }
  },
  "required": [
    "latitude",
    "longitude",
    "format"
  ]
}
API- und MCP-Dokumentation