Class: AIPP::LF::AIP::Obstacles

Inherits:
AIP::Parser show all
Includes:
Helpers::Base
Defined in:
lib/aipp/regions/LF/aip/obstacles.rb

Constant Summary collapse

TYPES =

Map type descriptions to AIXM types and remarks

{
  'Antenne' => [:antenna],
  'Autre' => [:other],
  'Bâtiment' => [:building],
  'Câble' => [:other, 'Cable / Câble'],
  'Centrale thermique' => [:building, 'Thermal power plant / Centrale thermique'],
  "Château d'eau" => [:tower, "Water tower / Château d'eau"],
  'Cheminée' => [:chimney],
  'Derrick' => [:tower, 'Derrick'],
  'Eglise' => [:tower, 'Church / Eglise'],
  'Eolienne' => [:wind_turbine],
  'Eolienne(s)' => [:wind_turbine],
  'Grue' => [:tower, 'Crane / Grue'],
  'Mât' => [:mast],
  'Phare marin' => [:tower, 'Lighthouse / Phare marin'],
  'Pile de pont' => [:other, 'Bridge piers / Pile de pont'],
  'Portique' => [:building, 'Arch / Portique'],
  'Pylône' => [:mast, 'Pylon / Pylône'],
  'Silo' => [:tower, 'Silo'],
  'Terril' => [:other, 'Spoil heap / Teril'],
  'Torchère' => [:chimney, 'Flare / Torchère'],
  'Tour' => [:tower],
  'Treillis métallique' => [:other, 'Metallic grid / Treillis métallique']
}.freeze

Constants included from Helpers::Base

Helpers::Base::VERSION

Instance Attribute Summary

Attributes inherited from Parser

#aixm

Instance Method Summary collapse

Methods included from Helpers::Base

#b_from, #d_from, #geometry_from, #layer_from, #organisation_lf, #origin_for, #setup, #source, #timetable_from, #xy_from, #z_from

Methods inherited from Parser

#add, dependencies, depends_on, #find, #find_by, #given, #initialize, #inspect, #link_to, #origin_for, #read, #section

Methods included from Patcher

#attach_patches, #detach_patches, included

Methods included from Debugger

#info, #original_warn, #verbose_info, #warn, #with_debugger

Constructor Details

This class inherits a constructor from AIPP::Parser

Instance Method Details

#parseObject



32
33
34
35
36
37
38
39
40
# File 'lib/aipp/regions/LF/aip/obstacles.rb', line 32

def parse
  if AIPP.options.region_options.include? 'lf_obstacles_xlsx'
    info("reading obstacles from XLSX")
    @xlsx = read('Obstacles')
    parse_from_xlsx
  else
    parse_from_xml
  end
end