Class: GPX::TrackPoint

Inherits:
Point show all
Defined in:
lib/gpx/trackpoint.rb

Overview

Basically the same as a point, the TrackPoint class is supposed to represent the points that are children of Segment elements. So, the only real difference is that TrackPoints hold a reference to their parent Segments.

Constant Summary

Constants inherited from Point

Point::D_TO_R

Instance Attribute Summary collapse

Attributes inherited from Point

#elevation, #lat, #lon, #time

Instance Method Summary collapse

Methods inherited from Point

#lat_lon, #latr, #lon_lat, #lonr, #to_xml

Methods inherited from Base

#instantiate_with_text_elements

Constructor Details

#initialize(opts = {}) ⇒ TrackPoint

Returns a new instance of TrackPoint.



30
31
32
33
# File 'lib/gpx/trackpoint.rb', line 30

def initialize(opts = {})
   super(opts)
   @segment = opts[:segment]
end

Instance Attribute Details

#segmentObject

Returns the value of attribute segment.



29
30
31
# File 'lib/gpx/trackpoint.rb', line 29

def segment
  @segment
end