class AIXM::Component::Geometry::Border

Borders are following natural or artifical border lines referenced by {#name} and starting at {#xy}.

Cheat Sheet in Pseudo Code:

border = AIXM.border(
  xy: AIXM.xy
  name: String
)

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

Attributes

name[R]

@return [String] name of the border

Public Class Methods

new(xy:, name:) click to toggle source
Calls superclass method
   # File lib/aixm/component/geometry/border.rb
23 def initialize(xy:, name:)
24   super(xy: xy)
25   self.name = name
26 end

Public Instance Methods

inspect() click to toggle source

@return [String]

   # File lib/aixm/component/geometry/border.rb
29 def inspect
30   %Q(#<#{self.class} xy="#{xy}" name=#{name.inspect}>)
31 end
name=(value) click to toggle source
   # File lib/aixm/component/geometry/border.rb
33 def name=(value)
34   fail(ArgumentError, "invalid name") unless value.is_a? String
35   @name = value
36 end
to_uid(as: :GbrUid) click to toggle source

@return [String] UID markup

   # File lib/aixm/component/geometry/border.rb
39 def to_uid(as: :GbrUid)
40   builder = Builder::XmlMarkup.new(indent: 2)
41   builder.tag!(as) do |tag|
42     tag.txtName(name.to_s)
43   end
44 end
to_xml() click to toggle source

@return [String] AIXM or OFMX markup

   # File lib/aixm/component/geometry/border.rb
48 def to_xml
49   builder = Builder::XmlMarkup.new(indent: 2)
50   builder.Avx do |avx|
51     avx << to_uid.indent(2)
52     avx.codeType('FNT')
53     avx.geoLat(xy.lat(AIXM.schema))
54     avx.geoLong(xy.long(AIXM.schema))
55     avx.codeDatum('WGE')
56   end
57 end