diff --git a/lib/gpx.rb b/lib/gpx.rb index 096f7d0..94699fd 100644 --- a/lib/gpx.rb +++ b/lib/gpx.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the diff --git a/lib/gpx/bounds.rb b/lib/gpx/bounds.rb index 49150bb..17038f7 100644 --- a/lib/gpx/bounds.rb +++ b/lib/gpx/bounds.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the diff --git a/lib/gpx/gpx.rb b/lib/gpx/gpx.rb index a46f96d..8b270c9 100644 --- a/lib/gpx/gpx.rb +++ b/lib/gpx/gpx.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ module GPX # an attribute to be initialized on the instance. This means you don't # have to pick out individual text elements in each initializer of each # class (Route, TrackPoint, Track, etc). Just pass an array of possible - # attributes to this method. + # attributes to this method. def instantiate_with_text_elements(parent, text_elements) text_elements.each do |el| child_xpath = "//#{el}" diff --git a/lib/gpx/gpx_file.rb b/lib/gpx/gpx_file.rb index 6ce2229..bdfd922 100644 --- a/lib/gpx/gpx_file.rb +++ b/lib/gpx/gpx_file.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -42,7 +42,7 @@ module GPX # some_track = get_track_from_csv('some_other_format.csv') # gpx_file = GPXFile.new(:tracks => [some_track]) # - def initialize(opts = {}) + def initialize(opts = {}) @duration = 0 if(opts[:gpx_file] or opts[:gpx_data]) if opts[:gpx_file] @@ -51,7 +51,7 @@ module GPX #when String # gpx_file = File.open(gpx_file) #end - gpx_file = gpx_file.name if gpx_file.is_a?(File) + gpx_file = gpx_file.name if gpx_file.is_a?(File) @xml = Hpricot(File.open(gpx_file)) else @xml = Hpricot(opts[:gpx_data]) @@ -62,7 +62,7 @@ module GPX #else # @ns = 'gpx:http://www.topografix.com/GPX/1/1' # default to GPX 1.1 #end - + reset_meta_data bounds_element = (@xml.at("//metadata/bounds") rescue nil) if bounds_element @@ -76,13 +76,13 @@ module GPX @time = Time.parse(@xml.at("//metadata/time").inner_text) rescue nil @name = @xml.at("//metadata/name").inner_text rescue nil - @tracks = [] - @xml.search("//trk").each do |trk| - trk = Track.new(:element => trk, :gpx_file => self) + @tracks = [] + @xml.search("//trk").each do |trk| + trk = Track.new(:element => trk, :gpx_file => self) update_meta_data(trk, get_bounds) @tracks << trk end - @waypoints = [] + @waypoints = [] @xml.search("//wpt").each { |wpt| @waypoints << Waypoint.new(:element => wpt, :gpx_file => self) } @routes = [] @xml.search("//rte").each { |rte| @routes << Route.new(:element => rte, :gpx_file => self) } @@ -116,7 +116,7 @@ module GPX def distance(opts = { :units => 'kilometers' }) case opts[:units] when /kilometers/i - return @distance + return @distance when /meters/i return (@distance * 1000) when /miles/i @@ -126,7 +126,7 @@ module GPX # Returns the average speed, in km/hr, meters/hr, or miles/hr, of this # GPXFile. The calculation is based on the total distance divided by the - # total duration of the entire file. + # total duration of the entire file. def average_speed(opts = { :units => 'kilometers' }) case opts[:units] when /kilometers/i @@ -145,11 +145,11 @@ module GPX def crop(area) reset_meta_data keep_tracks = [] - tracks.each do |trk| - trk.crop(area) + tracks.each do |trk| + trk.crop(area) unless trk.empty? update_meta_data(trk) - keep_tracks << trk + keep_tracks << trk end end @tracks = keep_tracks @@ -167,11 +167,11 @@ module GPX def delete_area(area) reset_meta_data keep_tracks = [] - tracks.each do |trk| - trk.delete_area(area) + tracks.each do |trk| + trk.delete_area(area) unless trk.empty? update_meta_data(trk) - keep_tracks << trk + keep_tracks << trk end end @tracks = keep_tracks @@ -180,7 +180,7 @@ module GPX end # Resets the meta data for this GPX file. Meta data includes the bounds, - # the high and low points, and the distance. + # the high and low points, and the distance. def reset_meta_data @bounds = Bounds.new @highest_point = nil @@ -214,7 +214,7 @@ module GPX doc.to_s end - private + private def generate_xml_doc doc = Document.new doc.root = Node.new('gpx') @@ -222,9 +222,9 @@ module GPX gpx_elem['xsi'] = "http://www.w3.org/2001/XMLSchema-instance" @version = '1.1' if (@version.nil? || !(['1.0', '1.1'].include?(@version))) # default to version 1.1 of the schema (only version 1.0 and 1.1 of the schema exist) version_dir = @version.gsub('.','/') - gpx_elem['xmlns'] = @ns || "http://www.topografix.com/GPX/#{version_dir}" + gpx_elem['xmlns'] = @ns || "http://www.topografix.com/GPX/#{version_dir}" gpx_elem['version'] = "#{@version}" - gpx_elem['creator'] = "GPX RubyGem #{GPX::VERSION} Copyright 2006-2009 Doug Fales -- http://gpx.rubyforge.org/" + gpx_elem['creator'] = "GPX RubyGem #{GPX::VERSION} Copyright 2006-2009 Doug Fales -- http://gpx.rubyforge.org/" gpx_elem['xsi:schemaLocation'] = "http://www.topografix.com/GPX/#{version_dir} http://www.topografix.com/GPX/#{version_dir}/gpx.xsd" # setup the metadata elements @@ -237,12 +237,12 @@ module GPX if (@version == '1.0') then gpx_elem << name_elem gpx_elem << time_elem - gpx_elem << bounds.to_xml + gpx_elem << bounds.to_xml else meta_data_elem = Node.new('metadata') meta_data_elem << name_elem meta_data_elem << time_elem - meta_data_elem << bounds.to_xml + meta_data_elem << bounds.to_xml gpx_elem << meta_data_elem end diff --git a/lib/gpx/magellan_track_log.rb b/lib/gpx/magellan_track_log.rb index 3d3c28a..7c31009 100644 --- a/lib/gpx/magellan_track_log.rb +++ b/lib/gpx/magellan_track_log.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,14 +27,14 @@ module GPX class MagellanTrackLog #PMGNTRK - # This message is to be used to transmit Track information (basically a list of previous position fixes) - # which is often displayed on the plotter or map screen of the unit. The first field in this message - # is the Latitude, followed by N or S. The next field is the Longitude followed by E or W. The next - # field is the altitude followed by “F” for feet or “M” for meters. The next field is - # the UTC time of the fix. The next field consists of a status letter of “A” to indicated that - # the data is valid, or “V” to indicate that the data is not valid. The last character field is - # the name of the track, for those units that support named tracks. The last field contains the UTC date - # of the fix. Note that this field is (and its preceding comma) is only produced by the unit when the + # This message is to be used to transmit Track information (basically a list of previous position fixes) + # which is often displayed on the plotter or map screen of the unit. The first field in this message + # is the Latitude, followed by N or S. The next field is the Longitude followed by E or W. The next + # field is the altitude followed by “F” for feet or “M” for meters. The next field is + # the UTC time of the fix. The next field consists of a status letter of “A” to indicated that + # the data is valid, or “V” to indicate that the data is not valid. The last character field is + # the name of the track, for those units that support named tracks. The last field contains the UTC date + # of the fix. Note that this field is (and its preceding comma) is only produced by the unit when the # command PMGNCMD,TRACK,2 is given. It is not present when a simple command of PMGNCMD,TRACK is issued. #NOTE: The Latitude and Longitude Fields are shown as having two decimal @@ -42,13 +42,13 @@ module GPX # length of the message does not exceed 82 bytes. # $PMGNTRK,llll.ll,a,yyyyy.yy,a,xxxxx,a,hhmmss.ss,A,c----c,ddmmyy*hh - require 'csv' + require 'csv' LAT = 1 LAT_HEMI = 2 LON = 3 LON_HEMI = 4 - ELE = 5 + ELE = 5 ELE_UNITS = 6 TIME = 7 INVALID_FLAG = 8 @@ -64,7 +64,7 @@ module GPX segment = Segment.new - CSV.open(magellan_filename, "r").each do |row| + CSV.open(magellan_filename, "r").each do |row| next if(row.size < 10 or row[INVALID_FLAG] == 'V') lat_deg = row[LAT][0..1] @@ -102,7 +102,7 @@ module GPX pt = TrackPoint.new(:lat => lat, :lon => lon, :time => time, :elevation => ele) segment.append_point(pt) - end + end trk = Track.new trk.append_segment(segment) @@ -118,11 +118,11 @@ module GPX f.each do |line| i += 1 if line =~ /^\$PMGNTRK/ - return true + return true elsif line =~ /<\?xml/ return false elsif(i > 10) - return false + return false end end end diff --git a/lib/gpx/route.rb b/lib/gpx/route.rb index ebfc6c2..cf69eea 100644 --- a/lib/gpx/route.rb +++ b/lib/gpx/route.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,7 +24,7 @@ module GPX # A Route in GPX is very similar to a Track, but it is created by a user # from a series of Waypoints, whereas a Track is created by the GPS device - # automatically logging your progress at regular intervals. + # automatically logging your progress at regular intervals. class Route < Base attr_accessor :points, :name, :gpx_file diff --git a/lib/gpx/segment.rb b/lib/gpx/segment.rb index 0835b3c..8e97571 100644 --- a/lib/gpx/segment.rb +++ b/lib/gpx/segment.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ module GPX class Segment < Base attr_reader :earliest_point, :latest_point, :bounds, :highest_point, :lowest_point, :distance - attr_accessor :points, :track + attr_accessor :points, :track # If a XML::Node object is passed-in, this will initialize a new # Segment based on its contents. Otherwise, a blank Segment is created. @@ -47,8 +47,8 @@ module GPX segment_element = opts[:element] last_pt = nil if segment_element.is_a?(Hpricot::Elem) - segment_element.search("//trkpt").each do |trkpt| - pt = TrackPoint.new(:element => trkpt, :segment => self, :gpx_file => @gpx_file) + segment_element.search("//trkpt").each do |trkpt| + pt = TrackPoint.new(:element => trkpt, :segment => self, :gpx_file => @gpx_file) unless pt.time.nil? @earliest_point = pt if(@earliest_point.nil? or pt.time < @earliest_point.time) @latest_point = pt if(@latest_point.nil? or pt.time > @latest_point.time) @@ -117,7 +117,7 @@ module GPX reset_meta_data keep_points = [] last_pt = nil - points.each do |pt| + points.each do |pt| unless yield(pt) keep_points << pt update_meta_data(pt, last_pt) @@ -175,7 +175,7 @@ module GPX RADIUS = 6371; # earth's mean radius in km # Calculate the Haversine distance between two points. This is the method - # the library uses to calculate the cumulative distance of GPX files. + # the library uses to calculate the cumulative distance of GPX files. def haversine_distance(p1, p2) d_lat = p2.latr - p1.latr; d_lon = p2.lonr - p1.lonr; diff --git a/lib/gpx/track.rb b/lib/gpx/track.rb index cb8892a..bbfb72a 100644 --- a/lib/gpx/track.rb +++ b/lib/gpx/track.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -39,7 +39,7 @@ module GPX @segments = [] @points = [] reset_meta_data - if(opts[:element]) + if(opts[:element]) trk_element = opts[:element] @name = (trk_element.at("//name").inner_text rescue "") trk_element.search("//trkseg").each do |seg_element| @@ -49,7 +49,7 @@ module GPX end end end - + # Append a segment to this track, updating its meta data along the way. def append_segment(seg) update_meta_data(seg) @@ -77,18 +77,18 @@ module GPX # The "area" paremeter is usually a Bounds object. def crop(area) reset_meta_data - segments.each do |seg| - seg.crop(area) + segments.each do |seg| + seg.crop(area) update_meta_data(seg) unless seg.empty? end segments.delete_if { |seg| seg.empty? } end - # Deletes all points within a given area and updates the meta data. + # Deletes all points within a given area and updates the meta data. def delete_area(area) reset_meta_data - segments.each do |seg| - seg.delete_area(area) + segments.each do |seg| + seg.delete_area(area) update_meta_data(seg) unless seg.empty? end segments.delete_if { |seg| seg.empty? } diff --git a/lib/gpx/trackpoint.rb b/lib/gpx/trackpoint.rb index 1b8c267..9ac033b 100644 --- a/lib/gpx/trackpoint.rb +++ b/lib/gpx/trackpoint.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the diff --git a/lib/gpx/waypoint.rb b/lib/gpx/waypoint.rb index 3090322..12684cc 100644 --- a/lib/gpx/waypoint.rb +++ b/lib/gpx/waypoint.rb @@ -1,5 +1,5 @@ #-- -# Copyright (c) 2006 Doug Fales +# Copyright (c) 2006 Doug Fales # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,10 +24,10 @@ module GPX # This class supports the concept of a waypoint. Beware that this class has - # not seen much use yet, since WalkingBoss does not use waypoints right now. + # not seen much use yet, since WalkingBoss does not use waypoints right now. class Waypoint < Point - SUB_ELEMENTS = %w{ magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions } + SUB_ELEMENTS = %w{ magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions } attr_reader :gpx_file SUB_ELEMENTS.each { |sub_el| attr_accessor sub_el.to_sym } @@ -81,7 +81,7 @@ module GPX SUB_ELEMENTS.each do |sub_element_name| if(self.respond_to?(sub_element_name) and (!self.send(sub_element_name).nil?)) sub_elem_node = Node.new(sub_element_name) - sub_elem_node << self.send(sub_element_name) + sub_elem_node << self.send(sub_element_name) wpt << sub_elem_node end end diff --git a/tests/output_test.rb b/tests/output_test.rb index 7d15c2d..fec34ff 100644 --- a/tests/output_test.rb +++ b/tests/output_test.rb @@ -13,7 +13,7 @@ class OutputTest < Test::Unit::TestCase def test_new_gpx_file_from_scratch gpx_file = GPXFile.new - track = Track.new(:name => "My First Track") + track = Track.new(:name => "My First Track") segment = Segment.new track_point_data = [ @@ -37,7 +37,7 @@ class OutputTest < Test::Unit::TestCase waypoint_data = [ {:lat => 39.997298, :lon => -105.292674, :name => 'GRG-CA', :sym => 'Waypoint', :elevation => 1766.535}, - {:lat => 33.330190, :lon => -111.946110, :name => 'GRMPHX', :sym => 'Waypoint', :elevation => 361.0981, + {:lat => 33.330190, :lon => -111.946110, :name => 'GRMPHX', :sym => 'Waypoint', :elevation => 361.0981, :cmt => "Hey here's a comment.", :desc => "Somewhere in my backyard.", :fix => '3d', :sat => "8", :hdop => "50.5", :vdop => "6.8", :pdop => "7.6"}, {:lat => 25.061783, :lon => 121.640267, :name => 'GRMTWN', :sym => 'Waypoint', :elevation => 38.09766}, {:lat => 39.999840, :lon => -105.214696, :name => 'SBDR', :sym => 'Waypoint', :elevation => 1612.965}, @@ -105,15 +105,15 @@ class OutputTest < Test::Unit::TestCase assert_equal(expected_value, IO.read(output_file(name_of_test))) end - + def name_of_test caller[0] =~ /`test_([^']*)'/ and $1 end - + def output_file(test_name) File.join(File.dirname(__FILE__), "output/#{test_name}.gpx") end - + THE_WORKS = "\n\n \n new_gpx_file_from_scratch.gpx\n \n \n \n \n \n \n \n \n 1737.24\n \n \n \n 1738.682\n \n \n \n 1738.682\n \n \n \n 1737.24\n \n \n \n 1735.798\n \n \n \n 1735.798\n \n \n \n 1736.278\n \n \n \n 1739.643\n \n \n \n 1732.433\n \n \n \n 1726.665\n \n \n \n \n GRG-CA\n Waypoint\n 1766.535\n \n \n GRMPHX\n Hey here's a comment.\n Somewhere in my backyard.\n Waypoint\n 3d\n 8\n 50.5\n 6.8\n 7.6\n 361.0981\n \n \n GRMTWN\n Waypoint\n 38.09766\n \n \n SBDR\n Waypoint\n 1612.965\n \n \n TO\n Waypoint\n 2163.556\n \n \n VICS\n Waypoint\n 1535.34\n \n \n \n \n \n 1735.798\n \n \n \n 1735.798\n \n \n \n 1736.278\n \n \n\n" end diff --git a/tests/route_test.rb b/tests/route_test.rb index e01616b..bd9b43b 100644 --- a/tests/route_test.rb +++ b/tests/route_test.rb @@ -21,7 +21,7 @@ class RouteTest < Test::Unit::TestCase assert_equal(-105.292674, first_route.points[0].lon) assert_equal(1766.535, first_route.points[0].elevation) - + # Route 1, Second Point # # @@ -35,7 +35,7 @@ class RouteTest < Test::Unit::TestCase # Route 1, Third Point # # -# Waypoint +# Waypoint # 2163.556 # assert_equal(39.989739, first_route.points[2].lat) @@ -50,7 +50,7 @@ class RouteTest < Test::Unit::TestCase # Route 2, Only Point # # -# Waypoint +# Waypoint # 1612.965 # assert_equal(39.999840, second_route.points[0].lat) @@ -59,5 +59,5 @@ class RouteTest < Test::Unit::TestCase end - + end diff --git a/tests/segment_test.rb b/tests/segment_test.rb index 74d838c..75ce34c 100644 --- a/tests/segment_test.rb +++ b/tests/segment_test.rb @@ -16,7 +16,7 @@ class SegmentTest < Test::Unit::TestCase assert_equal(1144437991, @segment.latest_point.time.to_i) assert_equal(1334.447, @segment.lowest_point.elevation) assert_equal(1480.087, @segment.highest_point.elevation) - assert_in_delta(6.98803359528853, @segment.distance, 0.001) + assert_in_delta(6.98803359528853, @segment.distance, 0.001) end def test_segment_crop @@ -26,8 +26,8 @@ class SegmentTest < Test::Unit::TestCase :max_lon=> -108.999000) @segment.crop(crop_rectangle) - assert_equal(106, @segment.points.size) - assert_in_delta(4.11422061733046, @segment.distance, 0.001) + assert_equal(106, @segment.points.size) + assert_in_delta(4.11422061733046, @segment.distance, 0.001) assert_equal(1144435041, @segment.earliest_point.time.to_i) assert_equal(1144437752, @segment.latest_point.time.to_i) assert_equal(1407.027, @segment.lowest_point.elevation) @@ -44,8 +44,8 @@ class SegmentTest < Test::Unit::TestCase :max_lat=> 39.188000, :max_lon=> -108.999000) @segment.delete_area(delete_rectangle) - assert_equal(83, @segment.points.size) - assert_in_delta(3.35967118153605, @segment.distance, 0.001) + assert_equal(83, @segment.points.size) + assert_in_delta(3.35967118153605, @segment.distance, 0.001) assert_equal(1144433525, @segment.earliest_point.time.to_i) assert_equal(1144437991, @segment.latest_point.time.to_i) assert_equal(1334.447, @segment.lowest_point.elevation) diff --git a/tests/track_test.rb b/tests/track_test.rb index 5afbf87..9e6fb58 100644 --- a/tests/track_test.rb +++ b/tests/track_test.rb @@ -11,38 +11,38 @@ class TrackTest < Test::Unit::TestCase def test_track_read assert_equal("ACTIVE LOG", @track.name) - assert_equal( 182, @track.points.size) + assert_equal( 182, @track.points.size) assert_equal(8, @track.segments.size) - assert_in_delta(3.07249668492626, @track.distance, 0.001) + assert_in_delta(3.07249668492626, @track.distance, 0.001) assert_equal(1267.155, @track.lowest_point.elevation) assert_equal(1594.003, @track.highest_point.elevation) - assert_equal(38.681488, @track.bounds.min_lat) - assert_equal(-109.606948, @track.bounds.min_lon) - assert_equal(38.791759, @track.bounds.max_lat) + assert_equal(38.681488, @track.bounds.min_lat) + assert_equal(-109.606948, @track.bounds.min_lon) + assert_equal(38.791759, @track.bounds.max_lat) assert_equal(-109.447045, @track.bounds.max_lon) end def test_track_crop - area = GPX::Bounds.new( + area = GPX::Bounds.new( :min_lat => 38.710000, :min_lon => -109.600000, :max_lat => 38.791759, :max_lon => -109.450000) @track.crop(area) assert_equal("ACTIVE LOG", @track.name) - assert_equal( 111, @track.points.size) + assert_equal( 111, @track.points.size) assert_equal(4, @track.segments.size) - assert_in_delta(1.62136024923607, @track.distance, 0.001) + assert_in_delta(1.62136024923607, @track.distance, 0.001) assert_equal(1557.954, @track.lowest_point.elevation) assert_equal(1582.468, @track.highest_point.elevation) - assert_equal(38.782511, @track.bounds.min_lat) - assert_equal(-109.599781, @track.bounds.min_lon) - assert_equal(38.789527, @track.bounds.max_lat) + assert_equal(38.782511, @track.bounds.min_lat) + assert_equal(-109.599781, @track.bounds.min_lon) + assert_equal(38.789527, @track.bounds.max_lat) assert_equal(-109.594996, @track.bounds.max_lon) end def test_track_delete - area = GPX::Bounds.new( + area = GPX::Bounds.new( :min_lat => 38.710000, :min_lon => -109.600000, :max_lat => 38.791759, @@ -51,14 +51,14 @@ class TrackTest < Test::Unit::TestCase #puts @track #assert_equal("ACTIVE LOG", @track.name) - #assert_equal( 111, @track.points.size) + #assert_equal( 111, @track.points.size) #assert_equal(4, @track.segments.size) - #assert_equal("1.62136024923607", @track.distance.to_s) + #assert_equal("1.62136024923607", @track.distance.to_s) #assert_equal(1557.954, @track.lowest_point.elevation) #assert_equal(1582.468, @track.highest_point.elevation) - #assert_equal(38.782511, @track.bounds.min_lat) - #assert_equal(-109.599781, @track.bounds.min_lon) - #assert_equal(38.789527, @track.bounds.max_lat) + #assert_equal(38.782511, @track.bounds.min_lat) + #assert_equal(-109.599781, @track.bounds.min_lon) + #assert_equal(38.789527, @track.bounds.max_lat) #assert_equal(-109.594996, @track.bounds.max_lon) end