Class: AIXM::Feature::NavigationalAid::DesignatedPoint

Inherits:
AIXM::Feature::NavigationalAid show all
Includes:
Concerns::Association
Defined in:
lib/aixm/feature/navigational_aid/designated_point.rb

Overview

Named geographical location used in defining an ATS route, aircraft flight paths or for other navigation purposes.

Cheat Sheet in Pseudo Code:

designated_point = AIXM.designated_point(
  source: String or nil
  region: String or nil
  id: String
  name: String or nil
  xy: AIXM.xy
  type: TYPES
)
designated_point.airport = AIXM.airport or nil
designated_point.remarks = String or nil
designated_point.comment = Object or nil

Constant Summary collapse

TYPES =
{
  ICAO: :icao,                                 # five-letter ICAO id
  ADHP: :adhp,                                 # airport related id
  COORD: :coordinates,                         # derived from geographical coordinates
  'VFR-RP': :vfr_reporting_point,              # usually one or two letter id
  'VFR-MRP': :vfr_mandatory_reporting_point,   # usually one or two letter id
  'VFR-ENR': :vfr_en_route_point,
  'VFR-GLD': :vfr_glider_point,
  OTHER: :other                                # specify in remarks
}.freeze

Constants inherited from AIXM::Feature

REGION_RE

Instance Attribute Summary collapse

Attributes inherited from AIXM::Feature::NavigationalAid

#id, #name, #xy, #z

Attributes included from Concerns::Remarks

#remarks

Attributes included from Concerns::Timetable

#timetable

Attributes inherited from AIXM::Feature

#comment, #region, #source

Attributes inherited from Component

#meta

Instance Method Summary collapse

Methods included from Concerns::Association

included

Methods inherited from AIXM::Feature::NavigationalAid

#inspect, #kind, #organisation

Methods inherited from AIXM::Feature

#==, #hash

Methods included from Concerns::HashEquality

#eql?, #hash

Methods included from Concerns::XMLBuilder

#build_fragment, #to_uid, #to_xml

Methods included from Concerns::Memoize

included, method

Constructor Details

#initialize(type:, **arguments) ⇒ DesignatedPoint

See the cheat sheet for examples on how to create instances of this class.



54
55
56
57
# File 'lib/aixm/feature/navigational_aid/designated_point.rb', line 54

def initialize(type:, **arguments)
  super(organisation: nil, z: nil, **arguments)
  self.type = type
end

Instance Attribute Details

#typeSymbol #type=(value) ⇒ Object

Type of designated point

Overloads:

  • #typeSymbol

    Returns any of TYPES.

    Returns:

    • (Symbol)

      any of TYPES

  • #type=(value) ⇒ Object

    Parameters:

    • value (Symbol)

      any of TYPES



50
51
52
# File 'lib/aixm/feature/navigational_aid/designated_point.rb', line 50

def type
  @type
end

Instance Method Details

#airportAIXM::Feature::Airport

Returns airport this designated point is associated with.

Returns:



42
# File 'lib/aixm/feature/navigational_aid/designated_point.rb', line 42

belongs_to :airport