{
  "slug": "gpx-split",
  "name": "gizza-ai/gpx-split",
  "version": "0.1.0",
  "title": "GPX Splitter — Split Tracks by Distance, Time, or Stops — gizza.ai",
  "description": "Split a GPX track into multiple segments by distance, elapsed time, or detected stop gaps. Output a new GPX or a per-segment summary locally in your browser.",
  "tags": [
    "gpx splitter",
    "gpx split",
    "split gpx track",
    "gpx distance split",
    "gpx time split",
    "gpx stop detection",
    "gps track segments"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/gpx-split/",
    "markdown": "https://gizza.ai/tools/gpx-split/index.md",
    "descriptor": "https://gizza.ai/tools/gpx-split/tool.json",
    "deep_link_example": "https://gizza.ai/tools/gpx-split/?gpx=%3Cgpx%3E%3Ctrk%3E%3Cname%3ERide%3C%2Fname%3E%3Ctrkseg%3E%3Ctrkpt%20lat%3D%220%22%20lon%3D%220%22%2F%3E%3Ctrkpt%20lat%3D%220.01%22%20lon%3D%220%22%2F%3E%3C%2Ftrkseg%3E%3C%2Ftrk%3E%3C%2Fgpx%3E&mode=distance&distance=5&unit=km&time_min=30&stop_gap_s=120&output=gpx"
  },
  "cli": "gizza tool gpx-split '<gpx><trk><name>Ride</name><trkseg><trkpt lat=\"0\" lon=\"0\"/><trkpt lat=\"0.01\" lon=\"0\"/></trkseg></trk></gpx>'",
  "tool": {
    "description": "Split one GPX track into multiple segments and return a new GPX (one named track per segment) plus per-segment stats. Three modes: distance (a new segment every N km or miles covered), time (a new segment every N minutes of elapsed time), or stops (a new segment wherever the recording pauses — the time gap between two points exceeds a threshold). Reads <trkpt>, <rtept>, and <wpt> points; preserves <ele> elevation and <time> timestamps. Distances are great-circle (haversine). Runs locally.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "distance": {
          "default": 5.0,
          "description": "Segment length for distance mode, in the chosen unit. Default 5.",
          "minimum": 0.01,
          "type": "number"
        },
        "gpx": {
          "description": "The full GPX file contents (XML). Track points may include <ele> elevation and <time> timestamps; timestamps are required for the time and stops split modes.",
          "type": "string"
        },
        "mode": {
          "default": "distance",
          "description": "How to cut the track: distance (every N km/mi covered), time (every N minutes of elapsed time), or stops (start a new segment at each pause, i.e. a time gap between points). Default distance.",
          "enum": [
            "distance",
            "time",
            "stops"
          ],
          "type": "string"
        },
        "output": {
          "default": "gpx",
          "description": "What to return: gpx (a GPX document with one named track per segment) or summary (a per-segment table of distance, duration and point count). Default gpx.",
          "enum": [
            "gpx",
            "summary"
          ],
          "type": "string"
        },
        "stop_gap_s": {
          "default": 120.0,
          "description": "For stops mode: the minimum time gap between two consecutive points (in seconds) that starts a new segment. Default 120.",
          "minimum": 1,
          "type": "number"
        },
        "time_min": {
          "default": 30.0,
          "description": "Segment length for time mode, in minutes. Default 30.",
          "minimum": 0.01,
          "type": "number"
        },
        "unit": {
          "default": "km",
          "description": "Distance unit for the distance-mode threshold: km or mi. Default km.",
          "enum": [
            "km",
            "mi"
          ],
          "type": "string"
        }
      },
      "required": [
        "gpx"
      ],
      "type": "object"
    }
  }
}