class NSWTopo::GPS
Public Class Methods
load(path)
click to toggle source
# File lib/nswtopo/gis/gps.rb, line 16 def self.load(path) new(path).collection end
new(path)
click to toggle source
# File lib/nswtopo/gis/gps.rb, line 6 def initialize(path) @xml = REXML::Document.new(path.read) case when @xml.elements["/gpx"] then extend GPX when @xml.elements["/kml"] then extend KML else raise "invalid GPX or KML file: #{path}" end end