Skip to content

adambird/broutes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Broutes

Ruby gem for parsing and extracting common data structures from geo route file formats like GPX.

Used in the Bunch Rides web app.

endorse

Supported Formats

Usage

Add this to your Gemfile

  gem 'broutes'

Then open a file and pass it in to the from_file method along with the format.

file = File.open('path to route file')
route = Broutes.from_file(file, :gpx_track)

The format string can either be a symbol, mimetype or filename from which the extension is used.

FormatSymbolMime TypeFile Extension
GPX Track:gpx_trackapplication/gpx+xml.gpx
Garmin TCX:tcxapplication/vnd.garmin.tcx+xml.tcx
ANT+ FIT:fitapplication/vnd.ant.fit.fit

The result route file will have a total distance, ascent and descent info as well as start and end points. Each point will also have it's location, elevation and distance along the route.

If the format used supports laps (TCX formats), the route will also have each lap. Each lap will have it's start time, total time, distance covered, calories burned, the average and maximum speed, and the average and maximum heart rate.

About

Utilities for parsing and creating geo route files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages