Sha256: da6f11e90c7391d61c8402623c759c75e13e01f9c67a130858d1fe7ac9c65bd1

Contents?: true

Size: 2 KB

Versions: 15

Compression:

Stored size: 2 KB

Contents

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

# History:
# 	Stan Smith 2019-04-16 original script.

require_relative '../iso19115_1_writer'
require_relative 'class_codelist'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_1

            class MD_GeometricObjects

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

               def writeXML(hGeoObj, inContext = nil)

                  # classes used
                  codelistClass = MD_Codelist.new(@xml, @hResponseObj)

                  outContext = 'geometric object'
                  outContext = inContext + ' geometric object' unless inContext.nil?

                  @xml.tag!('msr:MD_GeometricObjects') do

                     # geometric object - object type (required)
                     unless hGeoObj[:objectType].nil?
                        @xml.tag!('msr:geometricObjectType') do
                           codelistClass.writeXML('msr', 'iso_geometricObjectType', hGeoObj[:objectType])
                        end
                     end
                     if hGeoObj[:objectType].nil?
                        @NameSpace.issueWarning(150, 'msr:geometricObjectType', outContext)
                     end

                     # geometric object - object count
                     unless hGeoObj[:objectCount].nil?
                        @xml.tag!('msr:geometricObjectCount') do
                           @xml.tag!('gco:Integer', hGeoObj[:objectCount].to_s)
                        end
                     end
                     if hGeoObj[:objectCount].nil? && @hResponseObj[:writerShowTags]
                        @xml.tag!('msr:geometricObjectCount')
                     end

                  end # msr:MD_GeometricObjects tag
               end # writeXML
            end # MD_GeometricObjects class

         end
      end
   end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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