The coordinates of a point with an optional altitude. Required attribute 'geodetic_datum' is used to indicate the geodetic datum (also called 'map datum'), for example Google's KML uses 'WGS84'.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 462 def alt=(str) @alt = str.to_f unless str.nil? end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 454 def lat=(str) @lat = str.to_f unless str.nil? end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 458 def long=(str) @long = str.to_f unless str.nil? end
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 467 def to_xml raise "Geodedic datum is a required attribute of Point element." if @geodetic_datum.nil? p = LibXML::XML::Node.new('point') p["geodetic_datum"] = @geodetic_datum p["alt_unit"] = @alt_unit if @alt_unit != nil PhyloXML::Writer.generate_xml(p, self, [ [:simple, 'lat', @lat], [:simple, 'long', @long], [:simple, 'alt', @alt]]) return p #@todo check if characters are correctly generated, like Zuric end
Generated with the Darkfish Rdoc Generator 2.