Fixing README formatting.

master
Doug Fales 2010-02-27 16:13:14 -07:00
parent 287467de59
commit 2cc725d4cf
1 changed files with 11 additions and 7 deletions

18
README
View File

@ -1,8 +1,10 @@
= GPX Gem = GPX Gem
Copyright (C) 2006 Doug Fales Copyright (C) 2006 Doug Fales
Doug Fales mailto:doug@falesafeconsulting.com Doug Fales mailto:doug@falesafeconsulting.com
== What It Does == What It Does
This library reads GPX files and provides an API for reading and manipulating This library reads GPX files and provides an API for reading and manipulating
the data as objects. For more info on the GPX format, see the data as objects. For more info on the GPX format, see
http://www.topografix.com/gpx.asp. http://www.topografix.com/gpx.asp.
@ -14,19 +16,21 @@ the tracks and points in a file (such as distance, duration, average speed,
etc). etc).
== Examples == Examples
Reading a GPX file, and cropping its contents to a given area: Reading a GPX file, and cropping its contents to a given area:
gpx = GPX::GPXFile.new(:gpx_file => filename) # Read GPX file <tt>gpx = GPX::GPXFile.new(:gpx_file => filename) # Read GPX file</tt>
bounds = GPX::Bounds.new(params) # Create a rectangular area to crop <tt>bounds = GPX::Bounds.new(params) # Create a rectangular area to crop</tt>
gpx.crop(bounds) # Crop it <tt>gpx.crop(bounds) # Crop it</tt>
gpx.write(filename) # Save it <tt>gpx.write(filename) # Save it</tt>
Converting a Magellan track log to GPX: Converting a Magellan track log to GPX:
if GPX::MagellanTrackLog::is_magellan_file?(filename) <tt>if GPX::MagellanTrackLog::is_magellan_file?(filename)</tt>
GPX::MagellanTrackLog::convert_to_gpx(filename, "#{filename}.gpx") <tt> GPX::MagellanTrackLog::convert_to_gpx(filename, "#{filename}.gpx")</tt>
end <tt>end</tt>
== Notes == Notes
This library was written to bridge the gap between my Garmin Geko This library was written to bridge the gap between my Garmin Geko
and my website, WalkingBoss.org (RIP). For that reason, it has always been more of a and my website, WalkingBoss.org (RIP). For that reason, it has always been more of a
work-in-progress than an attempt at full GPX compliance. The track side of the work-in-progress than an attempt at full GPX compliance. The track side of the