A python library for transforming GPX data to GeoJSON format. It also gives you the ability to extract data from the gpx file such as: Total elevation, total distance, starting point, paired data.
Use the package manager pip to install geojson_transformer.
pip install geojson-transformer
from geojson_transformer import GeoJsonTransformer
# Create an object from a gpx file.
gpxfile = GeoJsonTransformer(path='path/to/my_gpx_file.gpx')
# Returns the total distance between each point in the gpx file.
gpxfile.total_distance
# Returns the total cumulative elevation between each point in the gpx file.
gpxfile.total_elevation
# Returns the first lat/lon pair found in the file.
gpxfile.starting_point
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.