Sha256: 2ca68de5c5b18c69d972b88689ac20fd7298f87dfe6c006686024b9a00d7a7e2

Contents?: true

Size: 1.93 KB

Versions: 27

Compression:

Stored size: 1.93 KB

Contents

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

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

require_relative '../iso19115_2_writer'
require_relative 'class_measure'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_2

            class LE_NominalResolution

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

               def writeXML(hResolution, inContext = nil)

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

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

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

                     haveResolution = false

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

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

                     unless haveResolution
                        @NameSpace.issueWarning(400, 'gmi:scanningResolution', outContext)
                     end

                  end # gmi:LE_NominalResolution
               end # writeXML
            end # LE_NominalResolution class

         end
      end
   end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_nominalResolution.rb