{
  "slug": "owntracks-to-gpx",
  "name": "gizza-ai/owntracks-to-gpx",
  "version": "0.1.0",
  "title": "OwnTracks to GPX Converter — JSON & .rec to Track XML — gizza.ai",
  "description": "Convert OwnTracks JSON or Recorder .rec exports into GPX 1.1 tracks with timestamps, elevation, segments, and optional OwnTracks extensions.",
  "tags": [
    "owntracks",
    "gpx",
    "location export",
    "recorder",
    "gps",
    "track",
    "json to gpx",
    "rec to gpx"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/owntracks-to-gpx/",
    "markdown": "https://gizza.ai/tools/owntracks-to-gpx/index.md",
    "descriptor": "https://gizza.ai/tools/owntracks-to-gpx/tool.json",
    "deep_link_example": "https://gizza.ai/tools/owntracks-to-gpx/?input=%5B%7B%22_type%22%3A%22location%22%2C%22lat%22%3A52.1%2C%22lon%22%3A5.1%2C%22tst%22%3A1704110400%2C%22alt%22%3A10%2C%22acc%22%3A12%7D%5D&track_name=Sunday%20hike&include_extensions=true&segment_gap_minutes=0&max_accuracy_meters=0"
  },
  "cli": "gizza tool owntracks-to-gpx '[{\"_type\":\"location\",\"lat\":52.1,\"lon\":5.1,\"tst\":1704110400,\"alt\":10,\"acc\":12}]'",
  "tool": {
    "description": "Convert an OwnTracks location export into a standard GPX 1.1 track. Accepts either JSON (an array of OwnTracks location objects from `ocat --format json`, the Recorder HTTP API's {\"count\":N,\"data\":[…]} object, or a single location object) or the Recorder `.rec` format (one record per line, tab-separated: an ISO timestamp, a type column such as `*`, then the JSON payload). Only _type=\"location\" records are converted (transitions, waypoints, lwt, etc. are skipped; a record with no _type but a lat/lon pair is still accepted). Each fix becomes a <trkpt lat lon> carrying <ele> (from alt) and <time> (from the tst epoch, formatted as ISO-8601 UTC; a .rec line's own ISO timestamp is used when tst is absent). All points go into one <trk>; set segment_gap_minutes to break it into <trkseg>s wherever the gap between fixes exceeds that many minutes. With include_extensions=true (the default), each point's accuracy/velocity/course/battery/tracker-id are emitted as <extensions> in an OwnTracks namespace. Set max_accuracy_meters to drop imprecise fixes. Paste the export as text; runs fully locally, no network access.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "include_extensions": {
          "default": true,
          "description": "Emit each fix's accuracy, velocity, course, battery, and tracker id as <extensions> in the OwnTracks namespace (GPX 1.1 has no core element for any of them). Set false for plain GPX with only latitude/longitude/elevation/time. Default true.",
          "type": "boolean"
        },
        "input": {
          "description": "The OwnTracks location export to convert, pasted as text. Either JSON (an array of location objects from `ocat --format json`, the Recorder HTTP API's {\"count\":N,\"data\":[…]} object, or a single location object) or the Recorder `.rec` format (one record per line, tab-separated: an ISO timestamp, a type column such as `*`, then the JSON payload). Only _type=\"location\" records are converted.",
          "type": "string"
        },
        "max_accuracy_meters": {
          "default": 0.0,
          "description": "Drop fixes whose reported accuracy (acc, in metres) is worse than this — a larger acc means a less certain position. 0 keeps every point; fixes without an acc value are always kept. Default 0.",
          "minimum": 0,
          "type": "number"
        },
        "segment_gap_minutes": {
          "default": 0.0,
          "description": "Start a new <trkseg> whenever the gap between consecutive fixes exceeds this many minutes (splits a continuous log into per-trip segments). 0 keeps every point in one segment. Default 0.",
          "minimum": 0,
          "type": "number"
        },
        "track_name": {
          "description": "Optional name for the output track (emitted as <trk><name>). Leave empty for no name. Example: \"Sunday hike\".",
          "type": "string"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}