class NSWTopo::GPS
def self.load(path)
def self.load(path) new(path).collection end
def initialize(path)
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 rescue SystemCallError raise "couldn't read file: #{path}" end