Skip to content

Instantly share code, notes, and snippets.

@dal
dal / cleangpx.py
Created December 31, 2012 01:38
Simple python script to remove unwanted discontinuities in gpx track files.
#!/usr/bin/python
'''
Split gpx tracks at discontinuities, that is, pairs of points in a track that
are further than a given distance threshold.
'''
import collections
from lxml import etree
import math
import optparse
import re