Sha256: 0c6908aad1da583520c3c95049d122bf49c91830c098de6d978444467ec85d29

Contents?: true

Size: 1.93 KB

Versions: 13

Compression:

Stored size: 1.93 KB

Contents

# ISO <<Class>> LE_NominalResolution
# 19115-1 writer output in XML

# History:
# 	Stan Smith 201-09-27 original script.

require_relative '../iso19115_1_writer'
require_relative 'class_measure'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_1

            class LE_NominalResolution

               def initialize(xml, hResponseObj)
                  @xml = xml
                  @hResponseObj = hResponseObj
                  @NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
               end

               def writeXML(hResolution, inContext = nil)

                  # classes used
                  measureClass = Measure.new(@xml, @hResponseObj)

                  outContext = 'resolution'
                  outContext = inContext + ' ' + outContext unless inContext.nil?

                  @xml.tag!('mrl:LE_NominalResolution') do

                     haveResolution = false

                     # resolution - scanning resolution {Measure} (required if)
                     unless hResolution[:scanningResolution].empty?
                        @xml.tag!('mrl:scanningResolution') do
                           measureClass.writeXML(hResolution[:scanningResolution], outContext)
                           haveResolution = true
                        end
                     end

                     unless hResolution[:groundResolution].empty?
                        @xml.tag!('mrl:groundResolution') do
                           measureClass.writeXML(hResolution[:groundResolution], outContext)
                           haveResolution = true
                        end
                     end

                     unless haveResolution
                        @NameSpace.issueWarning(450, 'mrl:scanningResolution', outContext)
                     end

                  end # mrl:LE_NominalResolution
               end # writeXML
            end # LE_NominalResolution class

         end
      end
   end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc6 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc3 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc2 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.17.1 lib/adiwg/mdtranslator/writers/iso19115_1/classes/class_nominalResolution.rb