class AIXM::Component::Geometry::Point

Points are defined by {#xy} coordinates.

Cheat Sheet in Pseudo Code:

point = AIXM.point(
  xy: AIXM.xy
)

@see gitlab.com/openflightmaps/ofmx/wikis/Airspace#point

Attributes

xy[R]

@return [AIXM::XY] (starting) point

Public Class Methods

new(xy:) click to toggle source
   # File lib/aixm/component/geometry/point.rb
25 def initialize(xy:)
26   self.xy = xy
27 end

Public Instance Methods

inspect() click to toggle source

@return [String]

   # File lib/aixm/component/geometry/point.rb
30 def inspect
31   %Q(#<#{self.class} xy="#{xy}">)
32 end
to_xml() click to toggle source

@return [String] AIXM or OFMX markup

   # File lib/aixm/component/geometry/point.rb
40 def to_xml
41   builder = Builder::XmlMarkup.new(indent: 2)
42   builder.Avx do |avx|
43     avx.codeType('GRC')
44     avx.geoLat(xy.lat(AIXM.schema))
45     avx.geoLong(xy.long(AIXM.schema))
46     avx.codeDatum('WGE')
47   end
48 end
xy=(value) click to toggle source
   # File lib/aixm/component/geometry/point.rb
34 def xy=(value)
35   fail(ArgumentError, "invalid xy") unless value.is_a? AIXM::XY
36   @xy = value
37 end