Skip to main content

split — Split by time intervals

Splits a GPX file into time-based segments. Produces one GPX file per interval and displays statistics for each segment.

gpx-analyzer split <file> [flags]

Flags

FlagDescriptionDefault
--intervalSplit interval (e.g., 24h, 12h, 30m)24h
--output-dirOutput directory for GPX filessplits
--prefixPrefix for generated file namessegment
--formatStats output format: text or jsontext
--smoothingElevation smoothingmedium
--dem-dirSRTM tiles directory(disabled)
--dem-auto-downloadAutomatically download missing SRTM tilestrue
--dem-cacheCache directory for downloaded tiles(OS cache dir)
--dem-max-memoryMaximum memory (MB) for loaded DEM tiles (0 = no limit)0
--dem-skip-validationSkip post-download DEM tile validation (faster)false
--elevation-thresholdElevation noise threshold (meters)2.0
--elevation-algoElevation gain algorithm: threshold, douglas-peucker, segmentsthreshold
--track-smoothingGPS track lat/lon smoothingnone
--dp-epsilonDouglas-Peucker: max vertical deviation (meters)3.0
--seg-min-lengthSegments: minimum segment length (meters)200.0
--seg-max-deviationSegments: max RMS residual (meters)2.0
--presetStop detection presethiking
--stop-speedOverride max speed for stop (m/s)(per preset)
--stop-durationOverride min duration for stop(per preset)
--max-hrMaximum heart rate (bpm) for HR zone calculation0 (disabled)

Examples

Split a multi-day track into 24h segments:

gpx-analyzer split alps-traverse.gpx

Produces:

splits/
segment-001.gpx # Day 1
segment-002.gpx # Day 2
segment-003.gpx # Day 3
...

Each segment comes with its statistics displayed in the terminal.

Split into half-days with a custom prefix:

gpx-analyzer split gr20.gpx --interval 12h --prefix stage --output-dir gr20-stages

Produces:

gr20-stages/
stage-001.gpx
stage-002.gpx
...

Split into 30-minute intervals (useful for effort analysis):

gpx-analyzer split marathon.gpx --interval 30m --preset trail

Split with JSON stats (for automated processing):

gpx-analyzer split tour-du-mont-blanc.gpx --format json > stages.json

Split an FKT with heavy smoothing and DEM:

gpx-analyzer split pct-karel-sabbe.gpx --interval 24h --dem-dir ./srtm/ --smoothing heavy