Class: GPXKML::GpxKml

Inherits:
Object
  • Object
show all
Defined in:
lib/gpx_kml.rb

Class Method Summary collapse

Class Method Details

.gpx?(gpx) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/gpx_kml.rb', line 27

def self.gpx?(gpx)
  gpx.is_a?(GPX::Gpx) && gpx.gpx?
end

.gpx_to_kml(gpx, destination_path) ⇒ Object



15
16
17
# File 'lib/gpx_kml.rb', line 15

def self.gpx_to_kml(gpx, destination_path)
  CONVERTER::Converter.gpx_to_kml(gpx, destination_path)
end

.kml?(kml) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/gpx_kml.rb', line 23

def self.kml?(kml)
  kml.is_a?(KML::Kml) && kml.kml?
end

.kml_to_gpx(kml, destination_path) ⇒ Object



19
20
21
# File 'lib/gpx_kml.rb', line 19

def self.kml_to_gpx(kml, destination_path)
  CONVERTER::Converter.kml_to_gpx(kml, destination_path)
end

.new_gpx(file_path) ⇒ Object



35
36
37
# File 'lib/gpx_kml.rb', line 35

def self.new_gpx(file_path)
  GPX::Gpx.new(file_path)
end

.new_kml(file_path) ⇒ Object



31
32
33
# File 'lib/gpx_kml.rb', line 31

def self.new_kml(file_path)
  KML::Kml.new(file_path)
end